diff options
author | pgen <p.gen.progs@gmail.com> | 2022-01-30 23:50:44 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2022-01-30 23:50:44 +0100 |
commit | a67de73f4557335f783b238c1924e9d4deb36176 (patch) | |
tree | 7c07426ce62b01e28aac9642071c21307624eb5a /index.c | |
parent | 88a764f34890b4a462feb0f3983b4f260d317ea1 (diff) |
Continue to add and fix comments
Diffstat (limited to 'index.c')
-rw-r--r-- | index.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -290,11 +290,16 @@ insert_sorted_index(long ** array, long * size, long * nb, long value) *array = xrealloc(*array, *size * sizeof(long)); } + /* Shift remaining array elements at position pos to position pos+1 */ + /* (shift right one position). */ + /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ if (*nb > pos) memmove((*array) + pos + 1, (*array) + pos, sizeof(value) * (*nb - pos)); (*nb)++; + /* Set the value of the element at position pos in the passed array. */ + /* """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */ (*array)[pos] = value; } |