Lines Matching refs:idx
122 blob_get(blob_T *b, int idx) in blob_get() argument
124 return ((char_u*)b->bv_ga.ga_data)[idx]; in blob_get()
132 blob_set(blob_T *blob, int idx, int byte) in blob_set() argument
134 ((char_u*)blob->bv_ga.ga_data)[idx] = byte; in blob_set()
142 blob_set_append(blob_T *blob, int idx, int byte) in blob_set_append() argument
148 if (idx < gap->ga_len in blob_set_append()
149 || (idx == gap->ga_len && ga_grow(gap, 1) == OK)) in blob_set_append()
151 blob_set(blob, idx, byte); in blob_set_append()
152 if (idx == gap->ga_len) in blob_set_append()
419 long idx; in blob_remove() local
425 idx = (long)tv_get_number_chk(&argvars[1], &error); in blob_remove()
431 if (idx < 0) in blob_remove()
433 idx = len + idx; in blob_remove()
434 if (idx < 0 || idx >= len) in blob_remove()
436 semsg(_(e_blobidx), idx); in blob_remove()
443 rettv->vval.v_number = (varnumber_T) *(p + idx); in blob_remove()
444 mch_memmove(p + idx, p + idx + 1, (size_t)len - idx - 1); in blob_remove()
458 if (end >= len || idx > end) in blob_remove()
466 blob->bv_ga.ga_len = end - idx + 1; in blob_remove()
467 if (ga_grow(&blob->bv_ga, end - idx + 1) == FAIL) in blob_remove()
473 mch_memmove((char_u *)blob->bv_ga.ga_data, p + idx, in blob_remove()
474 (size_t)(end - idx + 1)); in blob_remove()
480 mch_memmove(p + idx, p + end + 1, (size_t)(len - end - 1)); in blob_remove()
481 b->bv_ga.ga_len -= end - idx + 1; in blob_remove()