2222#include <stdlib.h>
2323
2424/**
25- * A list of offsets of newlines in a string. The offsets are assumed to be
26- * sorted/inserted in ascending order.
25+ * A list of offsets of the start of lines in a string. The offsets are assumed
26+ * to be sorted/inserted in ascending order.
2727 */
2828typedef struct {
2929 /** The number of offsets in the list. */
@@ -48,8 +48,8 @@ typedef struct {
4848} pm_line_column_t ;
4949
5050/**
51- * Initialize a new newline list with the given capacity. Returns true if the
52- * allocation of the offsets succeeds, otherwise returns false.
51+ * Initialize a new line offset list with the given capacity. Returns true if
52+ * the allocation of the offsets succeeds, otherwise returns false.
5353 *
5454 * @param list The list to initialize.
5555 * @param capacity The initial capacity of the list.
@@ -58,15 +58,15 @@ typedef struct {
5858bool pm_line_offset_list_init (pm_line_offset_list_t * list , size_t capacity );
5959
6060/**
61- * Clear out the newlines that have been appended to the list.
61+ * Clear out the offsets that have been appended to the list.
6262 *
6363 * @param list The list to clear.
6464 */
6565void pm_line_offset_list_clear (pm_line_offset_list_t * list );
6666
6767/**
68- * Append a new offset to the newline list. Returns true if the reallocation of
69- * the offsets succeeds (if one was necessary), otherwise returns false.
68+ * Append a new offset to the list. Returns true if the reallocation of the
69+ * offsets succeeds (if one was necessary), otherwise returns false.
7070 *
7171 * @param list The list to append to.
7272 * @param cursor The offset to append.
@@ -99,7 +99,7 @@ int32_t pm_line_offset_list_line(const pm_line_offset_list_t *list, uint32_t cur
9999pm_line_column_t pm_line_offset_list_line_column (const pm_line_offset_list_t * list , uint32_t cursor , int32_t start_line );
100100
101101/**
102- * Free the internal memory allocated for the newline list.
102+ * Free the internal memory allocated for the list.
103103 *
104104 * @param list The list to free.
105105 */
0 commit comments