1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
|
/*
* Mr. 4th Dimention - Allen Webster
*
* 07.12.2019
*
* Documentation of the custom layer's primary api : buffer-related calls
*
*/
// TOP
function void
doc_custom_api__buffer(Arena *arena, API_Definition *api_def, Doc_Cluster *cluster){
Doc_Function func = {};
if (begin_doc_call(arena, cluster, api_def, "get_buffer_count", &func)){
doc_function_brief(arena, &func, "Retrieve the number of buffers loaded in the core");
// params
doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the number of buffers loaded in the core");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "get_buffer_next", &func)){
doc_function_brief(arena, &func, "Iterate to the next buffer loaded in the core");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to iterate from, or zero to get the first buffer");
doc_function_param(arena, &func, "access");
doc_text(arena, params, "the type of access requirements used to filter on the buffers that are returned");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the id of the next buffer, or zero if there is no next buffer");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "get_buffer_by_name", &func)){
doc_function_brief(arena, &func, "Retrieve a buffer querying by name");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "name");
doc_text(arena, params, "the name to query against buffer names");
doc_function_param(arena, &func, "access");
doc_text(arena, params, "the type of access requirements used to determine whether or not to return a match");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the id of the buffer who's name agrees with name if it exists and it has the required access state, zero otherwise");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "get_buffer_by_file_name", &func)){
doc_function_brief(arena, &func, "Retrieve a buffer querying by file name");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "file_name");
doc_text(arena, params, "the name to query against buffer file names");
doc_function_param(arena, &func, "access");
doc_text(arena, params, "the type of access requirements used to determine whether or not to return a match");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the id of the buffer who's attached file name agrees with file_name if it exists and it has the required access state, zero otherwise");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_read_range", &func)){
doc_function_brief(arena, &func, "Read a range of text out of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to be read");
doc_function_param(arena, &func, "range");
doc_text(arena, params, "byte range in the buffer that will be read - the range is left inclusive right exclusive, for example the range [10,20) reads ten bytes, with the first byte read being the one with index 10.");
doc_function_param(arena, &func, "out");
doc_text(arena, params, "the buffer that will get the copy of the new text which should have at least range.max - range.min available bytes");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer exists and the range is completely contained within the buffer's contents, otherwise zero");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_replace_range", &func)){
doc_function_brief(arena, &func, "Replace a range of text with a specific string");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to modify");
doc_function_param(arena, &func, "range");
doc_text(arena, params, "the range of bytes to replace - the range is left inclusive right exclusive, for example the range [10,20) replaces ten bytes and the byte at index 20 remains in the buffer, possibly shifted if the string is not ten bytes");
doc_function_param(arena, &func, "string");
doc_text(arena, params, "the new text to be placed in the given range");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer eixsts and the range is contained within the buffer, zero otherwise");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "This operation is used to implement inserts by setting the range to be empty, [x,x) inserts the string at x, and it implements deletion by setting the string to be empty.");
doc_paragraph(arena, det);
doc_text(arena, det, "All modifications made by this call are simultaneously saved onto the buffer's history if is enabled.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_batch_edit", &func)){
doc_function_brief(arena, &func, "Replace a sorted sequence of ranges with specific strings");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to modify");
doc_function_param(arena, &func, "batch");
doc_text(arena, params, "the first batch edit in a linked list of edits to apply in one atomic modification");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer exists and the batch is correctly sorted and contained within the buffer, zero otherwise");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "The ranges of the batch edit should all refer to the range they would have edited in the original state of the buffer. Put another way, the user should make no assumption about what order the individual edist are applied, and instead should treat the operation as applying all replacements atomically.");
doc_paragraph(arena, det);
doc_text(arena, det, "All modifications made by this call are saved into the history as a single edit record, thus undoing this edit reversed the entire batch.");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "buffer_replace_range");
doc_function_add_related(arena, rel, "Batch_Edit");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_seek_string", &func)){
doc_function_brief(arena, &func, "Scan a buffer from a point to the first occurence of a string");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer");
doc_text(arena, params, "the id of the buffer who's contents to seek");
doc_function_param(arena, &func, "needle");
doc_text(arena, params, "the string to match against the contents of the buffer");
doc_function_param(arena, &func, "direction");
doc_text(arena, params, "the scan direction of the scan from the start point");
doc_function_param(arena, &func, "start_pos");
doc_text(arena, params, "the start point of the scan");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "a single string match containing the range of the match and 'match type' flags on success, when the buffer exists and a match is found, otherwise cleared to zero; one can easily determine whether there was a match by the buffer member of the result");
doc_paragraph(arena, ret);
doc_text(arena, ret, "The returned range is left inclusive right exclusive, so that range.max - range.min is the size of the match, and range.min is the first index of the matching string.");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "The match is never permitted to be found at start_pos, thus to search the whole buffer from the beginning start_pos should be -1 and to search backward from the end start_pos should be the size of the buffer.");
doc_paragraph(arena, ret);
doc_text(arena, ret, "Non-case sensitive matches are reported, but if the match that was found is case sensitive the StringMatch_CaseSensitive flag is set on the result.");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Scan_Direction");
doc_function_add_related(arena, rel, "String_Match");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_seek_character_class", &func)){
doc_function_brief(arena, &func, "Scan a buffer from a point to the first character in a specified set of characters");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer");
doc_text(arena, params, "the id of the buffer who's contents to seek");
doc_function_param(arena, &func, "predicate");
doc_text(arena, params, "specifies the set of bytes that will end the scan");
doc_function_param(arena, &func, "direction");
doc_text(arena, params, "the scan direction of the scan from the start point");
doc_function_param(arena, &func, "start_pos");
doc_text(arena, params, "the start point of the scan");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "a single string match containing a range of a single character on success, when the buffer exists and a match is found, otherwise a cleared to zero; one can easily determine whether there was a match by the buffer member of the result");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Character_Predicate");
doc_function_add_related(arena, rel, "String_Match");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_line_y_difference", &func)){
doc_function_brief(arena, &func, "Compute the signed vertical pixel distance between the top of two lines");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer who's layout will be measured");
doc_function_param(arena, &func, "width");
doc_text(arena, params, "the width parameter of the layout, passed to layout rules as a recommended wrap point");
doc_function_param(arena, &func, "face_id");
doc_text(arena, params, "the face parameter of the layout, passed to layout rules as a recommended face");
doc_function_param(arena, &func, "line_a");
doc_text(arena, params, "the line number of the line 'A' in the subtraction top(A) - top(B)");
doc_function_param(arena, &func, "line_b");
doc_text(arena, params, "the line number of the line 'B' in the subtraction top(A) - top(B)");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the signed distance between the lines in pixels on success, when the buffer exists and contains both given line numbers");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "Line numbers are 1 based.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_line_shift_y", &func)){
doc_function_brief(arena, &func, "Compute a new line number and pixel shift relative to a given line number and pixel shift, guaranteeing that the new line number is the one closest to containing the new point");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer who's layout will be measured");
doc_function_param(arena, &func, "width");
doc_text(arena, params, "the width parameter of the layout, passed to layout rules as a recommended wrap point");
doc_function_param(arena, &func, "face_id");
doc_text(arena, params, "the face parameter of the layout, passed to layout rules as a recommended face");
doc_function_param(arena, &func, "line");
doc_text(arena, params, "the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena, &func, "y_shift");
doc_text(arena, params, "the y shift, in pixels, from the top of the specified line to be measured");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the best match line number and the remaining y shift that is not accounted for by the change in line number on success, when the buffer exists and contains the line, cleared to zero otherwise");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "Line numbers are 1 based.");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Line_Shift_Vertical");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_pos_at_relative_xy", &func)){
doc_function_brief(arena, &func, "Compute a byte position at a particular point relative to the top left corner of a particular line");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer who's layout will be measured");
doc_function_param(arena, &func, "width");
doc_text(arena, params, "the width parameter of the layout, passed to layout rules as a recommended wrap point");
doc_function_param(arena, &func, "face_id");
doc_text(arena, params, "the face parameter of the layout, passed to layout rules as a recommended face");
doc_function_param(arena, &func, "base_line");
doc_text(arena, params, "the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena, &func, "relative_xy");
doc_text(arena, params, "the point, in pixels, interpreted relative to the line's top left corner, that will serve as the query point");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the byte index associated as the first byte of a character in the layout that is the closest to containing the query point on success, when the buffer exists and contains the line, zero otherwise");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "Line numbers are 1 based.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_relative_box_of_pos", &func)){
doc_function_brief(arena, &func, "Compute the box of a character that spans a particular byte position, relative to the top left corner of a given line");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer who's layout will be measured");
doc_function_param(arena, &func, "width");
doc_text(arena, params, "the width parameter of the layout, passed to layout rules as a recommended wrap point");
doc_function_param(arena, &func, "face_id");
doc_text(arena, params, "the face parameter of the layout, passed to layout rules as a recommended face");
doc_function_param(arena, &func, "base_line");
doc_text(arena, params, "the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena, &func, "pos");
doc_text(arena, params, "the absolute byte index of the position to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the rectangle of a character in the layout that is closest to including the given query position in it's span, with coordinates set relative to the top left corner of the base line, on success, when the buffer exists and contains the base line and query position, cleared to zero otherwise");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "Line numbers are 1 based.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_padded_box_of_pos", &func)){
doc_function_brief(arena, &func, "Compute the rectangle around a character at a particular byte position, relative to the top left corner of a given line");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer who's layout will be measured");
doc_function_param(arena, &func, "width");
doc_text(arena, params, "the width parameter of the layout, passed to layout rules as a recommended wrap point");
doc_function_param(arena, &func, "face_id");
doc_text(arena, params, "the face parameter of the layout, passed to layout rules as a recommended face");
doc_function_param(arena, &func, "base_line");
doc_text(arena, params, "the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena, &func, "pos");
doc_text(arena, params, "the absolute byte index of the position to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the rectangle around a character in the layout that is closest to including the given query position in it's span, with coordinates set relative to the top left corner of the base line, on success, when the buffer exists and contains the base line and query position, cleared to zero otherwise");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "Line numbers are 1 based.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_relative_character_from_pos", &func)){
doc_function_brief(arena, &func, "Compute a character index relative to a particular lines first character");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer who's layout will be measured");
doc_function_param(arena, &func, "width");
doc_text(arena, params, "the width parameter of the layout, passed to layout rules as a recommended wrap point");
doc_function_param(arena, &func, "face_id");
doc_text(arena, params, "the face parameter of the layout, passed to layout rules as a recommended face");
doc_function_param(arena, &func, "base_line");
doc_text(arena, params, "the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena, &func, "pos");
doc_text(arena, params, "the absolute byte index of the position to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the relative index, based at the first character of the base line, of the character that is closest to spanning the query position on success, when the buffer exists and contains the base line and query position, zero otherwise");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "Line numbers are 1 based.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_pos_from_relative_character", &func)){
doc_function_brief(arena, &func, "Compute the byte position associated with the start of a particular character specified relative to the first character of a particular line");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer who's layout will be measured");
doc_function_param(arena, &func, "width");
doc_text(arena, params, "the width parameter of the layout, passed to layout rules as a recommended wrap point");
doc_function_param(arena, &func, "face_id");
doc_text(arena, params, "the face parameter of the layout, passed to layout rules as a recommended face");
doc_function_param(arena, &func, "base_line");
doc_text(arena, params, "the line number of the line that serves as the relative starting point of the measurement");
doc_function_param(arena, &func, "relative_character");
doc_text(arena, params, "the relative character index of the query character, based at the first character of base line");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the byte index associated with the start of the character specified by the the base_line and relative_character parameters on success, when the buffer exists and contains the base line, zero otherwise");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "Line numbers are 1 based.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_exists", &func)){
doc_function_brief(arena, &func, "Check that a buffer id represents a real buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the buffer id to check");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero if the buffer exists, zero otherwise");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_get_access_flags", &func)){
doc_function_brief(arena, &func, "Retrieve the access flags of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the access flag fied of the buffer on success, when the buffer exists, otherwise zero");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Access_Flag");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_get_size", &func)){
doc_function_brief(arena, &func, "Retrieve the size of a buffer in bytes");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the size in bytes of the buffer on success, when the buffer exists, otherwise zero");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_get_line_count", &func)){
doc_function_brief(arena, &func, "Retrieve the line count of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the number of lines in the buffer on success, when the buffer exists, otherwise zero");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "push_buffer_base_name", &func)){
doc_function_brief(arena, &func, "Get a copy of the base name of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "arena");
doc_text(arena, params, "the arena on which the returned string will be allocated");
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the name assigned to the buffer when it was created on success, when the buffer exists, otherwise an empty string");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "push_buffer_unique_name", &func)){
doc_function_brief(arena, &func, "Get a copy of the unique name of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "out");
doc_text(arena, params, "the arena on which the returned string will be allocated");
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the name assigned to the buffer by resolving duplicate names on success, when the buffer exists, otherwise an empty string");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "push_buffer_file_name", &func)){
doc_function_brief(arena, &func, "Get a copy of the file name of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "arena");
doc_text(arena, params, "the arena on which the returned string will be allocated");
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the name of the file attached to the buffer when it was created, when the buffer exists and has an attached file, otherwise an empty string");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_get_dirty_state", &func)){
doc_function_brief(arena, &func, "Retrieve the dirty state flags of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the dirty state flags of the buffer on success, when it exists, otherwise zero");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Dirty_State");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_set_dirty_state", &func)){
doc_function_brief(arena, &func, "Set the dirty state of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to be modified");
doc_function_param(arena, &func, "dirty_state");
doc_text(arena, params, "the new value for the buffer's dirty state");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer exists, otherwise zero");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Dirty_State");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_set_layout", &func)){
doc_function_brief(arena, &func, "Set the layout function of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to be modified");
doc_function_param(arena, &func, "layout_func");
doc_text(arena, params, "the new layout function for the buffer's layout");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer exists, otherwise zero");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_clear_layout_cache", &func)){
doc_function_brief(arena, &func, "Clear all the layout information cached in the buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to be modified");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_get_layout", &func)){
doc_function_brief(arena, &func, "Retrieve the layout rule of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "a pointer to the function specifying the buffer's layout rule on success, when the buffer exists, zero otherwise");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_get_setting", &func)){
doc_function_brief(arena, &func, "Retrieve a core setting of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
doc_function_param(arena, &func, "setting");
doc_text(arena, params, "the id of the setting to query");
doc_function_param(arena, &func, "value_out");
doc_text(arena, params, "the output destination of the setting's value");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer and setting exist, zero otherwise");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Buffer_Setting_ID");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_set_setting", &func)){
doc_function_brief(arena, &func, "Retrieve a core setting of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to modify");
doc_function_param(arena, &func, "setting");
doc_text(arena, params, "the id of the setting to modify");
doc_function_param(arena, &func, "value");
doc_text(arena, params, "the new value of the specified setting");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer and setting exist, zero otherwise");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Buffer_Setting_ID");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_get_managed_scope", &func)){
doc_function_brief(arena, &func, "Retrieve the managed scope tied to the lifetime of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the id of the managed scope tied to the buffer on success, when the buffer exists, zero otherwise");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Managed_Scope");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_send_end_signal", &func)){
doc_function_brief(arena, &func, "Cause the buffer to reset it's lifetime");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to receive the signal");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer exists, zero otherwise");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "When a buffer's end signal is sent, it's managed scope is cleared, as if it had been destroyed and recreated, and the buffer end hook is run on the buffer. The upshot of this is that it is as if the buffer were closed and re-opened except that it still has the same id.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "create_buffer", &func)){
doc_function_brief(arena, &func, "Create a new buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "file_name");
doc_text(arena, params, "if there exists a file with the given name, and no buffer for that file, a new buffer is created, attached to the file, and named after the file; if no such file exists, or the buffer is forbidden from attaching to a file by the flags, then this is the name of a newly created detached buffer");
doc_function_param(arena, &func, "flags");
doc_text(arena, params, "flags controlling behavior of the buffer creation");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "if a buffer matching the file name already exists, it's id is returned, otherwise if a new buffer can be created according to the flags, a buffer is created and it's id is returned, if no matching buffer exists and no buffer can be created from it, zero is returned");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Buffer_Create_Flag");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_save", &func)){
doc_function_brief(arena, &func, "Save the contents of a buffer to a file");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer who's contents to write to disk");
doc_function_param(arena, &func, "file_name");
doc_text(arena, params, "the name of the file to be written, if empty and the buffer has an attached file, that is used instead, using this does not alter the attachment of the buffer either way");
doc_function_param(arena, &func, "flags");
doc_text(arena, params, "flags controlling the behavior of the save");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero when the buffer exists and the file was successfully written, zero otherwise");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Buffer_Save_Flag");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_kill", &func)){
doc_function_brief(arena, &func, "Close a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to close");
doc_function_param(arena, &func, "flags");
doc_text(arena, params, "flags controlling the buffer closing behavior");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "a code indicating the result of the attempt to kill a buffer, if the buffer does not exist this will be a failure, if the buffer exists but has unsaved changes, this will indicate as much unless flag was used to override the dirty state check, if the buffer is successfully closed that will be indicated by the code");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "When a buffer's dirty state includes unsaved changes, this call will not close the buffer unless it is forced to by the flags.");
doc_paragraph(arena, det);
doc_text(arena, det, "Certain buffers critical to the operation of the core cannot be closed, and attempts to close them will always result in failure to close.");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Buffer_Kill_Result");
doc_function_add_related(arena, rel, "Buffer_Kill_Flag");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_reopen", &func)){
doc_function_brief(arena, &func, "Reload the content of a buffer from the the attached file");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to reload");
doc_function_param(arena, &func, "flags");
doc_text(arena, params, "flags controlling the behavior of the reload");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero if the buffer exists and has an attached file that can be read, zero otherwise");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Buffer_Reopen_Flag");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_get_file_attributes", &func)){
doc_function_brief(arena, &func, "Get file attributes of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the file attributes of the buffer as set by the last time it synced with it's attached file on disk when the buffer exists, cleared to zero otherwise");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "File_Attributes");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_compute_cursor", &func)){
doc_function_brief(arena, &func, "Compute a buffer cursor from a buffer and a seek target");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer");
doc_text(arena, params, "the id of the buffer to query");
doc_function_param(arena, &func, "seek");
doc_text(arena, params, "the seek target to use in a query for full cursor information");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "the full cursor information for the position specified by the seek, if the buffer exists, otherwise cleared to zero");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Buffer_Seek");
doc_function_add_related(arena, rel, "Buffer_Cursor");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_history_get_max_record_index", &func)){
doc_function_brief(arena, &func, "Get the largest record index in the buffer history");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "if the buffer exists and has history enabled, the maximum index of the records in the history, otherwise zero");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_history_get_record_info", &func)){
doc_function_brief(arena, &func, "Get record information out of a buffer's history");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
doc_function_param(arena, &func, "index");
doc_text(arena, params, "the index of the record to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "on success, when the buffer exists and index is within the history index range, the record information at the given index, otherwise zero");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Record_Info");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_history_get_group_sub_record", &func)){
doc_function_brief(arena, &func, "Get a sub-record of a group record from a buffer history");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
doc_function_param(arena, &func, "index");
doc_text(arena, params, "the index of the record to query");
doc_function_param(arena, &func, "sub_index");
doc_text(arena, params, "the sub-index of the record to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "on success, when the buffer exists, it's history contains a group record at the given index, and the group record contains a record at the sub-index, the record information contained there, otherwise zero");
// related
Doc_Block *rel = doc_function_begin_related(arena, &func);
doc_function_add_related(arena, rel, "Record_Info");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_history_get_current_state_index", &func)){
doc_function_brief(arena, &func, "Get the current state index of the history");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to query");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "if the buffer exists and has history enabled, the current state index, otherwise zero");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "The current state index indicates how far backward the user has undone. If the index is the most recent record, then nothing has been undone. This way undo-redo operations do not have to modify the history stack, and instead just move the current state index through the stack. Normal modifications to the buffer cause the history to discard everything after the current state index, before putting the new record on top of the stack.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_history_set_current_state_index", &func)){
doc_function_brief(arena, &func, "Modify the current state index and update the buffer contents to reflect the contents of the buffer as it was at that index.");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to modify");
doc_function_param(arena, &func, "index");
doc_text(arena, params, "the new current state index value");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero if the buffer exists, has history enabled, and contains a record at the given index, otherwise zero");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "This call simultaneously changes the state index and modifies the buffer to reflect undoing the necessary records from the top of the stack, or redoing them if the state index is being moved forward.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_history_merge_record_range", &func)){
doc_function_brief(arena, &func, "Merge a range of records into a single group record");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to modify");
doc_function_param(arena, &func, "first_index");
doc_text(arena, params, "the first index in the range to merge");
doc_function_param(arena, &func, "last_index");
doc_text(arena, params, "the last index in the range to merge, forming an inclusive-inclusive range");
doc_function_param(arena, &func, "flags");
doc_text(arena, params, "flags controlling the behavior of the operation");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer exists, and the index range is contained within the buffer history, otherwise zero");
// details
Doc_Block *det = doc_function_details(arena, &func);
doc_text(arena, det, "Group records contain all the same information that the range of individual records previously contained. A group is treated as a single unit in undo-redo operations.");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_history_clear_after_current_state", &func)){
doc_function_brief(arena, &func, "Forget the portion of the buffer history on the redo side");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to modify");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer exists, otherwise zero");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_set_face", &func)){
doc_function_brief(arena, &func, "Change the face of a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "buffer_id");
doc_text(arena, params, "the id of the buffer to modify");
doc_function_param(arena, &func, "id");
doc_text(arena, params, "the id of the face to set on the buffer");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "non-zero on success, when the buffer and face exist, otherwise zero");
}
////////////////////////////////
if (begin_doc_call(arena, cluster, api_def, "buffer_find_all_matches", &func)){
doc_function_brief(arena, &func, "Find all matches for a search pattern in a buffer");
// params
Doc_Block *params = doc_function_begin_params(arena, &func);
doc_custom_app_ptr(arena, &func);
doc_function_param(arena, &func, "arena");
doc_text(arena, params, "the arena on which the returned string will be allocated");
doc_function_param(arena, &func, "buffer");
doc_text(arena, params, "the id of the buffer to search");
doc_function_param(arena, &func, "string_id");
doc_text(arena, params, "the id to store into the resulting string matches");
doc_function_param(arena, &func, "range");
doc_text(arena, params, "the range in byte positions where all matches must be contained");
doc_function_param(arena, &func, "needle");
doc_text(arena, params, "the string to search for in the buffer range");
doc_function_param(arena, &func, "predicate");
doc_text(arena, params, "a character predicate used to check the left and right side of the match to add left sloppy and right sloppy match flags.");
doc_function_param(arena, &func, "direction");
doc_text(arena, params, "the direction of the scan through the buffer range determining the order of the generated matches");
// return
Doc_Block *ret = doc_function_return(arena, &func);
doc_text(arena, ret, "a linked list of matches to the search pattern");
}
}
// BOTTOM
|