Skip to content

Commit 6fd4883

Browse files
jsorefplusvic
authored andcommitted
Spelling (#582)
* 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
1 parent 779b9a7 commit 6fd4883

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+229
-229
lines changed

args.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,17 @@ void args_print_error(
148148
{
149149
switch(error)
150150
{
151-
case ARGS_ERROR_UKNOWN_OPT:
151+
case ARGS_ERROR_UNKNOWN_OPT:
152152
fprintf(stderr, "unknown option `%s`\n", option);
153153
break;
154154
case ARGS_ERROR_TOO_MANY:
155155
fprintf(stderr, "too many `%s` options\n", option);
156156
break;
157157
case ARGS_ERROR_REQUIRED_INTEGER_ARG:
158-
fprintf(stderr, "option `%s` requieres an integer argument\n", option);
158+
fprintf(stderr, "option `%s` requires an integer argument\n", option);
159159
break;
160160
case ARGS_ERROR_REQUIRED_STRING_ARG:
161-
fprintf(stderr, "option `%s` requieres a string argument\n", option);
161+
fprintf(stderr, "option `%s` requires a string argument\n", option);
162162
break;
163163
case ARGS_ERROR_UNEXPECTED_ARG:
164164
fprintf(stderr, "option `%s` doesn't expect an argument\n", option);
@@ -198,7 +198,7 @@ int args_parse(
198198
}
199199
else
200200
{
201-
error = ARGS_ERROR_UKNOWN_OPT;
201+
error = ARGS_ERROR_UNKNOWN_OPT;
202202
}
203203
}
204204
else if (args_is_short_arg(arg))
@@ -230,7 +230,7 @@ int args_parse(
230230
}
231231
else
232232
{
233-
error = ARGS_ERROR_UKNOWN_OPT;
233+
error = ARGS_ERROR_UNKNOWN_OPT;
234234
}
235235

236236
if (error != ARGS_ERROR_OK)

args.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extern "C" {
4040

4141
typedef enum _args_error_type {
4242
ARGS_ERROR_OK,
43-
ARGS_ERROR_UKNOWN_OPT,
43+
ARGS_ERROR_UNKNOWN_OPT,
4444
ARGS_ERROR_TOO_MANY,
4545
ARGS_ERROR_REQUIRED_INTEGER_ARG,
4646
ARGS_ERROR_REQUIRED_STRING_ARG,
@@ -95,7 +95,7 @@ int args_parse(
9595

9696
void args_print_usage(
9797
args_option_t *options,
98-
int aligment);
98+
int alignment);
9999

100100

101101
#ifdef __cplusplus

docs/capi.rst

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
The C API
33
*********
44

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

9-
Initalizing and finalizing *libyara*
9+
Initializing and finalizing *libyara*
1010
====================================
1111

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

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

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

353353
.. c:function:: int yr_initialize(void)
354354
355-
Initalize the library. Must be called by the main thread before using any
355+
Initialize the library. Must be called by the main thread before using any
356356
other function. Return :c:macro:`ERROR_SUCCESS` on success another error
357357
code in case of error. The list of possible return codes vary according
358358
to the modules compiled into YARA.
@@ -377,7 +377,7 @@ Functions
377377
378378
:c:macro:`ERROR_SUCCESS`
379379
380-
:c:macro:`ERROR_INSUFICENT_MEMORY`
380+
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
381381
382382
.. c:function:: void yr_compiler_destroy(YR_COMPILER* compiler)
383383
@@ -422,7 +422,7 @@ Functions
422422
423423
:c:macro:`ERROR_SUCCESS`
424424
425-
:c:macro:`ERROR_INSUFICENT_MEMORY`
425+
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
426426
427427
.. c:function:: int yr_compiler_define_integer_variable(YR_COMPILER* compiler, const char* identifier, int64_t value)
428428
@@ -468,7 +468,7 @@ Functions
468468
469469
:c:macro:`ERROR_SUCCESS`
470470
471-
:c:macro:`ERROR_INSUFICENT_MEMORY`
471+
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
472472
473473
:c:macro:`ERROR_COULD_NOT_OPEN_FILE`
474474
@@ -486,7 +486,7 @@ Functions
486486
487487
:c:macro:`ERROR_SUCCESS`
488488
489-
:c:macro:`ERROR_INSUFICENT_MEMORY`
489+
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
490490
491491
:c:macro:`ERROR_INVALID_FILE`
492492
@@ -500,7 +500,7 @@ Functions
500500
501501
:c:macro:`ERROR_SUCCESS`
502502
503-
:c:macro:`ERROR_INSUFICENT_MEMORY`
503+
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
504504
505505
:c:macro:`ERROR_TOO_MANY_SCAN_THREADS`
506506
@@ -517,7 +517,7 @@ Functions
517517
518518
:c:macro:`ERROR_SUCCESS`
519519
520-
:c:macro:`ERROR_INSUFICENT_MEMORY`
520+
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
521521
522522
:c:macro:`ERROR_COULD_NOT_MAP_FILE`
523523
@@ -542,7 +542,7 @@ Functions
542542
543543
:c:macro:`ERROR_SUCCESS`
544544
545-
:c:macro:`ERROR_INSUFICENT_MEMORY`
545+
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
546546
547547
:c:macro:`ERROR_COULD_NOT_MAP_FILE`
548548
@@ -647,9 +647,9 @@ Error codes
647647
648648
Everything went fine.
649649

650-
.. c:macro:: ERROR_INSUFICENT_MEMORY
650+
.. c:macro:: ERROR_INSUFFICIENT_MEMORY
651651
652-
Insuficient memory to complete the operation.
652+
Insufficient memory to complete the operation.
653653

654654
.. c:macro:: ERROR_COULD_NOT_OPEN_FILE
655655
@@ -678,7 +678,7 @@ Error codes
678678
.. c:macro:: ERROR_TOO_MANY_SCAN_THREADS
679679
680680
Too many threads trying to use the same :c:type:`YR_RULES` object
681-
simultaneosly. The limit is defined by ``MAX_THREADS`` in
681+
simultaneously. The limit is defined by ``MAX_THREADS`` in
682682
*./include/yara/limits.h*
683683

684684
.. c:macro:: ERROR_SCAN_TIMEOUT

docs/gettingstarted.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ not. If you want to enforce the OpenSSL-dependant features you must pass
4444
``--with-crypto`` to the ``configure`` script. Ubuntu and Debian users can
4545
use ``sudo apt-get install libssl-dev`` to install the OpenSSL library.
4646

47-
The following modules are not copiled into YARA by default:
47+
The following modules are not compiled into YARA by default:
4848

4949
* cuckoo
5050
* magic

docs/writingmodules.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ After the declaration section you'll find a pair of functions:
123123
return ERROR_SUCCESS;
124124
}
125125
126-
The ``module_initialize`` function is called during YARA's initializtion while
126+
The ``module_initialize`` function is called during YARA's initialization while
127127
its counterpart ``module_finalize`` is called while finalizing YARA. These
128128
functions allows you initialize and finalize any global data structure you may
129129
need to use in your module.
@@ -274,7 +274,7 @@ declare string, integer, or float variables respectively. For example::
274274
end_declarations;
275275

276276
.. note::
277-
Floating-point variables requiere YARA version 3.3.0 or later.
277+
Floating-point variables require YARA version 3.3.0 or later.
278278

279279

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

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

331-
When refering to these variables from your rules it would be like this::
331+
When referring to these variables from your rules it would be like this::
332332

333333
mymodule.foo
334334
mymodule.some_structure.foo
@@ -692,7 +692,7 @@ Setting variable's values
692692
-------------------------
693693

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

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

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

973973
.. code-block:: c
974974

docs/writingrules.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ Executable entry point
617617

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

11341134
In order to allow you a more flexible organization of your rules files,
11351135
YARA provides the ``include`` directive. This directive works in a similar way
1136-
to the *#include* pre-procesor directive in your C programs, which inserts the
1136+
to the *#include* pre-processor directive in your C programs, which inserts the
11371137
content of the specified source file into the current file during compilation.
11381138
The following example will include the content of *other.yar* into the current
11391139
file::

libyara/ahocorasick.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ int _yr_ac_queue_push(
7979
pushed_node = (QUEUE_NODE*) yr_malloc(sizeof(QUEUE_NODE));
8080

8181
if (pushed_node == NULL)
82-
return ERROR_INSUFICIENT_MEMORY;
82+
return ERROR_INSUFFICIENT_MEMORY;
8383

8484
pushed_node->previous = queue->tail;
8585
pushed_node->next = NULL;
@@ -484,7 +484,7 @@ int _yr_ac_find_suitable_transition_table_slot(
484484
automaton->m_table, m_bytes_size * 2);
485485

486486
if (automaton->t_table == NULL || automaton->m_table == NULL)
487-
return ERROR_INSUFICIENT_MEMORY;
487+
return ERROR_INSUFFICIENT_MEMORY;
488488

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

608-
return ERROR_INSUFICIENT_MEMORY;
608+
return ERROR_INSUFFICIENT_MEMORY;
609609
}
610610

611611
memset(automaton->t_table, 0,
@@ -775,7 +775,7 @@ int yr_ac_automaton_create(
775775
yr_free(new_automaton);
776776
yr_free(root_state);
777777

778-
return ERROR_INSUFICIENT_MEMORY;
778+
return ERROR_INSUFFICIENT_MEMORY;
779779
}
780780

781781
root_state->depth = 0;
@@ -850,7 +850,7 @@ int yr_ac_add_string(
850850
next_state = _yr_ac_state_create(state, atom->atom[i]);
851851

852852
if (next_state == NULL)
853-
return ERROR_INSUFICIENT_MEMORY;
853+
return ERROR_INSUFFICIENT_MEMORY;
854854
}
855855

856856
state = next_state;

0 commit comments

Comments
 (0)