Lines Matching refs:type

54 find_viminfo_parameter(int type)  in find_viminfo_parameter()  argument
60 if (*p == type) in find_viminfo_parameter()
79 get_viminfo_parameter(int type) in get_viminfo_parameter() argument
83 p = find_viminfo_parameter(type); in get_viminfo_parameter()
472 int type, in hist_type2char() argument
475 if (type == HIST_CMD) in hist_type2char()
477 if (type == HIST_SEARCH) in hist_type2char()
484 if (type == HIST_EXPR) in hist_type2char()
498 int type; in prepare_viminfo_history() local
508 for (type = 0; type < HIST_COUNT; ++type) in prepare_viminfo_history()
510 histentry_T *histentry = get_histentry(type); in prepare_viminfo_history()
522 viminfo_history[type] = NULL; in prepare_viminfo_history()
524 viminfo_history[type] = LALLOC_MULT(histentry_T, len); in prepare_viminfo_history()
525 if (viminfo_history[type] == NULL) in prepare_viminfo_history()
527 viminfo_hislen[type] = len; in prepare_viminfo_history()
528 viminfo_hisidx[type] = 0; in prepare_viminfo_history()
539 int type; in read_viminfo_history() local
544 type = hist_char2type(virp->vir_line[0]); in read_viminfo_history()
545 if (viminfo_hisidx[type] < viminfo_hislen[type]) in read_viminfo_history()
552 if (!in_history(type, val + (type == HIST_SEARCH), in read_viminfo_history()
560 if (type == HIST_SEARCH) in read_viminfo_history()
574 viminfo_history[type][viminfo_hisidx[type]].hisstr = p; in read_viminfo_history()
575 viminfo_history[type][viminfo_hisidx[type]].time_set = 0; in read_viminfo_history()
576 viminfo_history[type][viminfo_hisidx[type]].viminfo = TRUE; in read_viminfo_history()
577 viminfo_history[type][viminfo_hisidx[type]].hisnum = 0; in read_viminfo_history()
578 viminfo_hisidx[type]++; in read_viminfo_history()
596 int type; in handle_viminfo_history() local
611 type = vp[0].bv_nr; in handle_viminfo_history()
612 if (type >= HIST_COUNT) in handle_viminfo_history()
614 if (viminfo_hisidx[type] < viminfo_hislen[type]) in handle_viminfo_history()
619 int sep = type == HIST_SEARCH && vp[2].bv_type == BVAL_NR in handle_viminfo_history()
624 if (!in_history(type, val, viminfo_add_at_front, sep, writing)) in handle_viminfo_history()
628 for (idx = 0; idx < viminfo_hisidx[type]; ++idx) in handle_viminfo_history()
630 p = viminfo_history[type][idx].hisstr; in handle_viminfo_history()
632 && (type != HIST_SEARCH || sep == p[STRLEN(p) + 1])) in handle_viminfo_history()
649 viminfo_history[type][idx].time_set = vp[1].bv_nr; in handle_viminfo_history()
655 viminfo_history[type][idx].hisstr = p; in handle_viminfo_history()
656 viminfo_history[type][idx].hisnum = 0; in handle_viminfo_history()
657 viminfo_history[type][idx].viminfo = TRUE; in handle_viminfo_history()
658 viminfo_hisidx[type]++; in handle_viminfo_history()
670 concat_history(int type) in concat_history() argument
675 histentry_T *histentry = get_histentry(type); in concat_history()
676 int *hisidx = get_hisidx(type); in concat_history()
677 int *hisnum = get_hisnum(type); in concat_history()
679 idx = *hisidx + viminfo_hisidx[type]; in concat_history()
700 for (i = 0; i < viminfo_hisidx[type]; i++) in concat_history()
703 histentry[idx].hisstr = viminfo_history[type][i].hisstr; in concat_history()
705 histentry[idx].time_set = viminfo_history[type][i].time_set; in concat_history()
711 for (i = 0; i < viminfo_hisidx[type]; i++) in concat_history()
734 merge_history(int type) in merge_history() argument
742 histentry_T *histentry = get_histentry(type); in merge_history()
743 int *hisidx = get_hisidx(type); in merge_history()
744 int *hisnum = get_hisnum(type); in merge_history()
747 max_len = hislen + viminfo_hisidx[type]; in merge_history()
756 for (i = 0; i < viminfo_hisidx[type]; i++) in merge_history()
757 tot_hist[i] = &viminfo_history[type][i]; in merge_history()
782 for (i = 0; i < viminfo_hisidx[type]; i++) in merge_history()
783 vim_free(viminfo_history[type][i].hisstr); in merge_history()
787 set_histentry(type, new_hist); in merge_history()
797 int type; in finish_viminfo_history() local
800 for (type = 0; type < HIST_COUNT; ++type) in finish_viminfo_history()
802 if (get_histentry(type) == NULL) in finish_viminfo_history()
806 merge_history(type); in finish_viminfo_history()
808 concat_history(type); in finish_viminfo_history()
810 VIM_CLEAR(viminfo_history[type]); in finish_viminfo_history()
811 viminfo_hisidx[type] = 0; in finish_viminfo_history()
825 int type; in write_viminfo_history() local
834 for (type = 0; type < HIST_COUNT; ++type) in write_viminfo_history()
836 histentry_T *histentry = get_histentry(type); in write_viminfo_history()
837 int *hisidx = get_hisidx(type); in write_viminfo_history()
839 num_saved = get_viminfo_parameter(hist_type2char(type, FALSE)); in write_viminfo_history()
845 type == HIST_CMD ? _("Command Line") : in write_viminfo_history()
846 type == HIST_SEARCH ? _("Search String") : in write_viminfo_history()
847 type == HIST_EXPR ? _("Expression") : in write_viminfo_history()
848 type == HIST_INPUT ? _("Input Line") : in write_viminfo_history()
861 else if (viminfo_hisidx[type] > 0) in write_viminfo_history()
869 && !(round == 2 && i >= viminfo_hisidx[type])) in write_viminfo_history()
882 p = viminfo_history[type] == NULL ? NULL in write_viminfo_history()
883 : viminfo_history[type][i].hisstr; in write_viminfo_history()
884 timestamp = viminfo_history[type] == NULL ? 0 in write_viminfo_history()
885 : viminfo_history[type][i].time_set; in write_viminfo_history()
893 fputc(hist_type2char(type, TRUE), fp); in write_viminfo_history()
896 if (type == HIST_SEARCH) in write_viminfo_history()
913 type, (long)timestamp, cbuf); in write_viminfo_history()
934 for (i = 0; i < viminfo_hisidx[type]; ++i) in write_viminfo_history()
935 if (viminfo_history[type] != NULL) in write_viminfo_history()
936 vim_free(viminfo_history[type][i].hisstr); in write_viminfo_history()
937 VIM_CLEAR(viminfo_history[type]); in write_viminfo_history()
938 viminfo_hisidx[type] = 0; in write_viminfo_history()
1219 int type = VAR_NUMBER; in read_viminfo_varlist() local
1231 case 'S': type = VAR_STRING; break; in read_viminfo_varlist()
1233 case 'F': type = VAR_FLOAT; break; in read_viminfo_varlist()
1235 case 'D': type = VAR_DICT; break; in read_viminfo_varlist()
1236 case 'L': type = VAR_LIST; break; in read_viminfo_varlist()
1237 case 'B': type = VAR_BLOB; break; in read_viminfo_varlist()
1238 case 'X': type = VAR_SPECIAL; break; in read_viminfo_varlist()
1244 tv.v_type = type; in read_viminfo_varlist()
1245 if (type == VAR_STRING || type == VAR_DICT in read_viminfo_varlist()
1246 || type == VAR_LIST || type == VAR_BLOB) in read_viminfo_varlist()
1250 else if (type == VAR_FLOAT) in read_viminfo_varlist()
1256 if (type == VAR_SPECIAL && (tv.vval.v_number == VVAL_FALSE in read_viminfo_varlist()
1260 if (type == VAR_DICT || type == VAR_LIST) in read_viminfo_varlist()
1275 else if (type == VAR_BLOB) in read_viminfo_varlist()
1731 int type; in handle_viminfo_register() local
1754 type = vp[2].bv_nr; in handle_viminfo_register()
1755 if (type != MCHAR && type != MLINE && type != MBLOCK) in handle_viminfo_register()
1789 y_ptr->y_type = type; in handle_viminfo_register()
1820 char_u *type; in write_viminfo_registers() local
1885 type = (char_u *)"LINE"; in write_viminfo_registers()
1888 type = (char_u *)"CHAR"; in write_viminfo_registers()
1891 type = (char_u *)"BLOCK"; in write_viminfo_registers()
1895 type = (char_u *)"LINE"; in write_viminfo_registers()
1904 fprintf(fp, "\t%s\t%d\n", type, (int)y_ptr->y_width); in write_viminfo_registers()