Skip to content

Commit ecf8803

Browse files
committed
docs: C API layout in documentation site.
1 parent 1eb36bb commit ecf8803

2 files changed

Lines changed: 41 additions & 40 deletions

File tree

site/content/docs/api/c.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ function in this API.
208208
Type that represents a YARA-X compiler. It takes one or more sets of YARA
209209
rules in text form and compile them into a [YRX_RULES](#yrx_rules) object.
210210

211-
#### yrx_compiler_create
211+
### yrx_compiler_create
212212

213213
```c
214214
enum YRX_RESULT yrx_compiler_create(
@@ -257,7 +257,7 @@ combination of the following flags:
257257
Disables `include` statements. The compiler will produce an error
258258
if an `include` statement is encountered.
259259
260-
#### yrx_compiler_destroy
260+
### yrx_compiler_destroy
261261
262262
```c
263263
void yrx_compiler_destroy(
@@ -266,7 +266,7 @@ void yrx_compiler_destroy(
266266

267267
Destroys the compiler [YRX_COMPILER](#yrx_compiler) object.
268268

269-
#### yrx_compiler_add_source
269+
### yrx_compiler_add_source
270270

271271
```c
272272
enum YRX_RESULT yrx_compiler_add_source(
@@ -277,7 +277,7 @@ enum YRX_RESULT yrx_compiler_add_source(
277277
Adds a YARA source code to be compiled. This function can be called multiple
278278
times.
279279
280-
#### yrx_compiler_add_source_with_origin
280+
### yrx_compiler_add_source_with_origin
281281
282282
```c
283283
enum YRX_RESULT yrx_compiler_add_source_with_origin(
@@ -294,7 +294,7 @@ This origin is shown in error reports.
294294

295295
------
296296

297-
#### yrx_compiler_add_include_dir
297+
### yrx_compiler_add_include_dir
298298

299299
```c
300300
enum YRX_RESULT yrx_compiler_add_include_dir(
@@ -312,7 +312,7 @@ directory.
312312
313313
------
314314
315-
#### yrx_compiler_ignore_module
315+
### yrx_compiler_ignore_module
316316
317317
```c
318318
enum YRX_RESULT yrx_compiler_ignore_module(
@@ -327,7 +327,7 @@ the rest of rules that don't rely on that module will be correctly compiled.
327327

328328
------
329329

330-
#### yrx_compiler_max_warnings
330+
### yrx_compiler_max_warnings
331331

332332
{{< callout >}}
333333
New in version 1.16.0
@@ -343,7 +343,7 @@ Sets the maximum number of warnings. The compiler will report only the first `n`
343343
344344
------
345345
346-
#### yrx_compiler_ban_module
346+
### yrx_compiler_ban_module
347347
348348
```c
349349
enum YRX_RESULT yrx_compiler_ban_module(
@@ -361,7 +361,7 @@ be updated.
361361

362362
------
363363

364-
#### yrx_compiler_new_namespace
364+
### yrx_compiler_new_namespace
365365

366366
```c
367367
enum YRX_RESULT yrx_compiler_new_namespace(
@@ -375,7 +375,7 @@ rules under the newly created namespace. The `namespace` argument must be
375375
pointer to null-terminated UTF-8 string. If the string is not valid UTF-8 the
376376
result is an `YRX_INVALID_ARGUMENT` error.
377377
378-
#### yrx_compiler_define_global_xxxx
378+
### yrx_compiler_define_global_xxxx
379379
380380
```c
381381
enum YRX_RESULT yrx_compiler_define_global_str(
@@ -426,7 +426,7 @@ When defining a map, keys must be of string type, and values can be any of the
426426
types supported by YARA, including other maps. Arrays must be homogeneous (all
427427
elements must be the same type).
428428

429-
#### yrx_compiler_errors_json
429+
### yrx_compiler_errors_json
430430

431431
```c
432432
enum YRX_RESULT yrx_compiler_errors_json(
@@ -476,7 +476,7 @@ The `YRX_BUFFER` must be destroyed with [`yrx_buffer_destroy`](#yrx_buffer_destr
476476

477477
------
478478

479-
#### yrx_compiler_warnings_json
479+
### yrx_compiler_warnings_json
480480

481481
```c
482482
enum YRX_RESULT yrx_compiler_warnings_json(
@@ -526,7 +526,7 @@ The `YRX_BUFFER` must be destroyed with [`yrx_buffer_destroy`](#yrx_buffer_destr
526526

527527
------
528528

529-
#### yrx_compiler_build
529+
### yrx_compiler_build
530530

531531
```c
532532
struct YRX_RULES *yrx_compiler_build(struct YRX_COMPILER *compiler);
@@ -547,15 +547,15 @@ Type that represents a set of compiled rules. The compiled rules can be used for
547547
scanning data by creating a scanner
548548
with [yrx_scanner_create](#yrx_scanner_create).
549549
550-
#### yrx_rules_count
550+
### yrx_rules_count
551551
552552
```c
553553
int yrx_rules_count(struct YRX_RULES *rules);
554554
```
555555

556556
Returns the total number of rules. The result is -1 in case of error.
557557

558-
#### yrx_rules_destroy
558+
### yrx_rules_destroy
559559

560560
```c
561561
void yrx_rules_destroy(struct YRX_RULES *rules);
@@ -564,7 +564,7 @@ void yrx_rules_destroy(struct YRX_RULES *rules);
564564
Destroys the [YRX_RULES](#yrx_rules) object. This function must be called only
565565
after all the scanners using the [YRX_RULES](#yrx_rules) object are destroyed.
566566
567-
#### yrx_rules_iter
567+
### yrx_rules_iter
568568
569569
```c
570570
enum YRX_RESULT yrx_rules_iter(
@@ -577,7 +577,7 @@ Iterates over the compiled rules, calling the callback function for each rule.
577577
The `user_data` pointer can be used to provide additional context to your
578578
callback function. See [YRX_RULE_CALLBACK](#yrx_rule_callback) for more details.
579579

580-
#### yrx_rules_iter_imports
580+
### yrx_rules_iter_imports
581581

582582
```c
583583
enum YRX_RESULT yrx_rules_iter_imports(
@@ -595,7 +595,7 @@ function.
595595
See [YRX_IMPORT_CALLBACK](#yrx_import_callback) for more details.
596596
597597
598-
#### yrx_rules_serialize
598+
### yrx_rules_serialize
599599
600600
```c
601601
enum YRX_RESULT yrx_rules_serialize(
@@ -612,7 +612,7 @@ itself, and its length.
612612

613613
The [YRX_BUFFER](#yrx_buffer) must be destroyed with [yrx_buffer_destroy](#yrx_buffer_destroy).
614614

615-
#### yrx_rules_deserialize
615+
### yrx_rules_deserialize
616616

617617
```c
618618
enum YRX_RESULT yrx_rules_deserialize(
@@ -629,7 +629,7 @@ Deserializes the rules from a sequence of bytes produced by [yrx_rules_serialize
629629
630630
### YRX_SCANNER
631631
632-
#### yrx_scanner_create
632+
### yrx_scanner_create
633633
634634
```c
635635
enum YRX_RESULT yrx_scanner_create(
@@ -648,15 +648,15 @@ long as the rules are not destroyed, so, always destroy
648648
the [YRX_SCANNER](#yrx_scanner) object before the [YRX_RULES](#yrx_rules)
649649
object.
650650

651-
#### yrx_scanner_destroy
651+
### yrx_scanner_destroy
652652

653653
```c
654654
void yrx_scanner_destroy(struct YRX_SCANNER *scanner);
655655
```
656656
657657
Destroys the [YRX_SCANNER](#yrx_scanner) object.
658658
659-
#### yrx_scanner_on_matching_rule
659+
### yrx_scanner_on_matching_rule
660660
661661
```c
662662
enum YRX_RESULT yrx_scanner_on_matching_rule(
@@ -674,7 +674,7 @@ about matching rules.
674674

675675
See [YRX_ON_MATCHING_RULE](#yrx_on_matching_rule) for more details.
676676

677-
#### yrx_scanner_on_console_log
677+
### yrx_scanner_on_console_log
678678

679679
```c
680680
enum YRX_RESULT yrx_scanner_on_console_log(
@@ -687,7 +687,7 @@ rule with the `console.log()` function.
687687
688688
See [YRX_CONSOLE_CALLBACK](#yrx_on_matching_rule) for more details.
689689
690-
#### yrx_scanner_scan
690+
### yrx_scanner_scan
691691
692692
```c
693693
enum YRX_RESULT yrx_scanner_scan(
@@ -698,7 +698,7 @@ enum YRX_RESULT yrx_scanner_scan(
698698

699699
Scans a memory buffer.
700700

701-
#### yrx_scanner_scan_block
701+
### yrx_scanner_scan_block
702702

703703
```c
704704
enum YRX_RESULT yrx_scanner_scan_block(
@@ -714,7 +714,7 @@ smaller, discrete blocks, allowing for incremental scanning.
714714
715715
See: [Block scanning mode](#block-scanning-mode)
716716
717-
#### yrx_scanner_finish
717+
### yrx_scanner_finish
718718
719719
```c
720720
enum YRX_RESULT yrx_scanner_finish(
@@ -734,15 +734,15 @@ scanning mode and can't be used for normal scanning.
734734

735735
See: [Block scanning mode](#block-scanning-mode)
736736

737-
#### yrx_scanner_set_timeout
737+
### yrx_scanner_set_timeout
738738

739739
```c
740740
enum YRX_RESULT yrx_scanner_set_timeout(
741741
struct YRX_SCANNER *scanner,
742742
uint64_t timeout);
743743
```
744744
745-
#### yrx_scanner_set_global_xxxx
745+
### yrx_scanner_set_global_xxxx
746746
747747
```c
748748
enum YRX_RESULT yrx_scanner_set_global_str(
@@ -773,7 +773,7 @@ enum YRX_RESULT yrx_scanner_set_global_json(
773773

774774
------
775775

776-
#### yrx_scanner_set_module_output
776+
### yrx_scanner_set_module_output
777777

778778
```c
779779
enum YRX_RESULT yrx_scanner_set_module_output(
@@ -809,7 +809,7 @@ If the scanner is in block scanning mode this function returns `YRX_INVALID_STAT
809809
810810
------
811811
812-
#### yrx_scanner_set_module_data
812+
### yrx_scanner_set_module_data
813813
814814
```c
815815
enum YRX_RESULT yrx_scanner_set_module_data(
@@ -836,7 +836,7 @@ If the scanner is in block scanning mode this function returns `YRX_INVALID_STAT
836836

837837
------
838838

839-
#### yrx_scanner_iter_slowest_rules
839+
### yrx_scanner_iter_slowest_rules
840840

841841
```c
842842
enum YRX_RESULT yrx_scanner_iter_slowest_rules(
@@ -867,7 +867,7 @@ See also:
867867
868868
------
869869
870-
#### yrx_scanner_clear_profiling_data
870+
### yrx_scanner_clear_profiling_data
871871
872872
```c
873873
enum YRX_RESULT yrx_scanner_clear_profiling_data(
@@ -916,7 +916,7 @@ to arbitrary data owned by the user.
916916
Represents a single YARA rule. The callback function passed to the scanner
917917
for reporting matches receives a pointer to a [YRX_RULE](#yrx_rule).
918918
919-
#### yrx_rule_identifier
919+
### yrx_rule_identifier
920920
921921
```c
922922
enum YRX_RESULT yrx_rule_identifier(
@@ -935,7 +935,7 @@ The `*ident` pointer will be valid as long as the [YRX_RULES](#yrx_rules) object
935935
that contains the rule is not destroyed. The identifier is guaranteed to be a
936936
valid UTF-8 string.
937937

938-
#### yrx_rule_namespace
938+
### yrx_rule_namespace
939939

940940
```c
941941
enum YRX_RESULT yrx_rule_namespace(
@@ -954,7 +954,7 @@ The `*ns` pointer will be valid as long as the [YRX_RULES](#yrx_rules) object
954954
that contains the rule is not destroyed. The namespace is guaranteed to be a
955955
valid UTF-8 string.
956956
957-
#### yrx_rule_iter_metadata
957+
### yrx_rule_iter_metadata
958958
959959
```c
960960
struct YRX_METADATA *yrx_rule_iter_metadata(
@@ -969,7 +969,7 @@ to a [YRX_METADATA](#yrx_metadata) structure for each metadata in the rule.
969969
The `user_data` pointer can be used to provide additional context to your
970970
callback function.
971971

972-
#### yrx_rule_iter_patterns
972+
### yrx_rule_iter_patterns
973973

974974
```c
975975
struct YRX_PATTERNS *yrx_rule_iter_patterns(
@@ -984,7 +984,7 @@ to a [YRX_PATTERN](#yrx_pattern) structure for each pattern.
984984
The `user_data` pointer can be used to provide additional context to your
985985
callback function.
986986
987-
#### yrx_rule_iter_tags
987+
### yrx_rule_iter_tags
988988
989989
```c
990990
enum YRX_RESULT yrx_rule_iter_tags(
@@ -1003,7 +1003,7 @@ callback function. See `YRX_TAG_CALLBACK` for more details.
10031003

10041004
An individual pattern defined in a rule.
10051005

1006-
#### yrx_pattern_identifier
1006+
### yrx_pattern_identifier
10071007

10081008
```c
10091009
enum YRX_RESULT yrx_pattern_identifier(
@@ -1022,7 +1022,7 @@ identifier. The `*ident` pointer will be valid as long as
10221022
the [YRX_RULES](#yrx_rules) object that contains the rule defining this pattern
10231023
is not destroyed. The identifier is guaranteed to be a valid UTF-8 string.
10241024
1025-
#### yrx_pattern_iter_matches
1025+
### yrx_pattern_iter_matches
10261026
10271027
```c
10281028
enum YRX_RESULT yrx_pattern_iter_matches(
@@ -1323,7 +1323,7 @@ typedef struct YRX_BUFFER {
13231323

13241324
------
13251325

1326-
#### yrx_buffer_destroy
1326+
### yrx_buffer_destroy
13271327

13281328
```c
13291329
void yrx_buffer_destroy(struct YRX_BUFFER *buf);

site/hugo_stats.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@
509509
"has_importimport",
510510
"has_rpathrpath",
511511
"header",
512+
"heading",
512513
"hexinteger",
513514
"hexmessage-integer",
514515
"higher-overall-performance",

0 commit comments

Comments
 (0)