src/evalfunc.c
static int
list2proftime(typval_T *arg, proftime_T *tm)
{
    long	n1, n2;
    int	error = FALSE;

    if (arg->v_type != VAR_LIST || arg->vval.v_list == NULL
					     || arg->vval.v_list->lv_len != 2)
	return FAIL;
    n1 = list_find_nr(arg->vval.v_list, 0L, &error);
    n2 = list_find_nr(arg->vval.v_list, 1L, &error);
# ifdef MSWIN
    tm->HighPart = n1;
    tm->LowPart = n2;
# else
    tm->tv_sec = n1;
    tm->tv_usec = n2;
# endif
    return error ? FAIL : OK;
}
/*
 * Convert a List to proftime_T.
 * Return FAIL when there is something wrong.
 */
Convert a List to proftime_T.
Return FAIL when there is something wrong.
Convert a List to proftime_T . Return FAIL when there is something wrong .
static int
list2proftime(typval_T *arg, proftime_T *tm)
{
    long	n1, n2;
    int	error = FALSE;
    if (arg->v_type != VAR_LIST || arg->vval.v_list == NULL
					     || arg->vval.v_list->lv_len != 2)
	return FAIL;
    n1 = list_find_nr(arg->vval.v_list, 0L, &error);
    n2 = list_find_nr(arg->vval.v_list, 1L, &error);
# ifdef MSWIN
    tm->HighPart = n1;
    tm->LowPart = n2;
# else
    tm->tv_sec = n1;
    tm->tv_usec = n2;
# endif
    return error ? FAIL : OK;
}
static int list2proftime ( typval_T * arg , proftime_T * tm ) { long n1 , n2 ; int error = FALSE ; if ( arg -> v_type != VAR_LIST || arg -> vval . v_list == NULL || arg -> vval . v_list -> lv_len != 2 ) return FAIL ; n1 = list_find_nr ( arg -> vval . v_list , 0L , & error ) ; n2 = list_find_nr ( arg -> vval . v_list , 1L , & error ) ; # ifdef MSWIN tm -> HighPart = n1 ; tm -> LowPart = n2 ; # else tm -> tv_sec = n1 ; tm -> tv_usec = n2 ; # endif return error ? FAIL : OK ; }
Convert a List to proftime_T.
Convert a List to proftime_T .