Mercurial > vim
comparison src/eval.c @ 274:8fa8d7964cf1 v7.0073
updated for version 7.0073
author | vimboss |
---|---|
date | Thu, 19 May 2005 21:08:39 +0000 |
parents | 8d34af900bae |
children | 946f0cbdd535 |
comparison
equal
deleted
inserted
replaced
273:2463194c8cdd | 274:8fa8d7964cf1 |
---|---|
11412 rettv->vval.v_string = r; | 11412 rettv->vval.v_string = r; |
11413 | 11413 |
11414 if (argvars[2].v_type != VAR_UNKNOWN) | 11414 if (argvars[2].v_type != VAR_UNKNOWN) |
11415 { | 11415 { |
11416 dictitem_T v; | 11416 dictitem_T v; |
11417 char_u str[30]; | 11417 char_u str[30]; |
11418 | 11418 |
11419 sprintf((char *)str, "0x%x", (unsigned int)w); | 11419 sprintf((char *)str, "0x%x", (unsigned int)w); |
11420 v.di_tv.v_type = VAR_STRING; | 11420 v.di_tv.v_type = VAR_STRING; |
11421 v.di_tv.vval.v_string = vim_strsave(str); | 11421 v.di_tv.vval.v_string = vim_strsave(str); |
11422 set_var(get_tv_string(&argvars[2]), &v.di_tv, FALSE); | 11422 set_var(get_tv_string(&argvars[2]), &v.di_tv, FALSE); |
16865 | 16865 |
16866 if (p_verbose >= 12) | 16866 if (p_verbose >= 12) |
16867 { | 16867 { |
16868 ++no_wait_return; | 16868 ++no_wait_return; |
16869 msg_scroll = TRUE; /* always scroll up, don't overwrite */ | 16869 msg_scroll = TRUE; /* always scroll up, don't overwrite */ |
16870 msg_str((char_u *)_("calling %s"), sourcing_name); | 16870 smsg((char_u *)_("calling %s"), sourcing_name); |
16871 if (p_verbose >= 14) | 16871 if (p_verbose >= 14) |
16872 { | 16872 { |
16873 char_u buf[MSG_BUF_LEN]; | 16873 char_u buf[MSG_BUF_LEN]; |
16874 char_u numbuf[NUMBUFLEN]; | 16874 char_u numbuf[NUMBUFLEN]; |
16875 char_u *tofree; | 16875 char_u *tofree; |
16948 #endif | 16948 #endif |
16949 | 16949 |
16950 /* when being verbose, mention the return value */ | 16950 /* when being verbose, mention the return value */ |
16951 if (p_verbose >= 12) | 16951 if (p_verbose >= 12) |
16952 { | 16952 { |
16953 char_u *sn; | |
16954 | |
16955 ++no_wait_return; | 16953 ++no_wait_return; |
16956 msg_scroll = TRUE; /* always scroll up, don't overwrite */ | 16954 msg_scroll = TRUE; /* always scroll up, don't overwrite */ |
16957 | 16955 |
16958 /* Make sure the output fits in IObuff. */ | |
16959 sn = sourcing_name; | |
16960 if (STRLEN(sourcing_name) > IOSIZE / 2 - 50) | |
16961 sn = sourcing_name + STRLEN(sourcing_name) - (IOSIZE / 2 - 50); | |
16962 | |
16963 if (aborting()) | 16956 if (aborting()) |
16964 smsg((char_u *)_("%s aborted"), sn); | 16957 smsg((char_u *)_("%s aborted"), sourcing_name); |
16965 else if (fc.rettv->v_type == VAR_NUMBER) | 16958 else if (fc.rettv->v_type == VAR_NUMBER) |
16966 smsg((char_u *)_("%s returning #%ld"), sn, | 16959 smsg((char_u *)_("%s returning #%ld"), sourcing_name, |
16967 (long)fc.rettv->vval.v_number); | 16960 (long)fc.rettv->vval.v_number); |
16968 else | 16961 else |
16969 { | 16962 { |
16970 char_u buf[MSG_BUF_LEN]; | 16963 char_u buf[MSG_BUF_LEN]; |
16971 char_u numbuf[NUMBUFLEN]; | 16964 char_u numbuf[NUMBUFLEN]; |
16972 char_u *tofree; | 16965 char_u *tofree; |
16973 | 16966 |
16967 /* The value may be very long. Skip the middle part, so that we | |
16968 * have some idea how it starts and ends. smsg() would always | |
16969 * truncate it at the end. */ | |
16974 trunc_string(tv2string(fc.rettv, &tofree, numbuf), | 16970 trunc_string(tv2string(fc.rettv, &tofree, numbuf), |
16975 buf, MSG_BUF_CLEN); | 16971 buf, MSG_BUF_CLEN); |
16976 smsg((char_u *)_("%s returning %s"), sn, buf); | 16972 smsg((char_u *)_("%s returning %s"), sourcing_name, buf); |
16977 vim_free(tofree); | 16973 vim_free(tofree); |
16978 } | 16974 } |
16979 msg_puts((char_u *)"\n"); /* don't overwrite this either */ | 16975 msg_puts((char_u *)"\n"); /* don't overwrite this either */ |
16980 cmdline_row = msg_row; | 16976 cmdline_row = msg_row; |
16981 --no_wait_return; | 16977 --no_wait_return; |
16992 | 16988 |
16993 if (p_verbose >= 12 && sourcing_name != NULL) | 16989 if (p_verbose >= 12 && sourcing_name != NULL) |
16994 { | 16990 { |
16995 ++no_wait_return; | 16991 ++no_wait_return; |
16996 msg_scroll = TRUE; /* always scroll up, don't overwrite */ | 16992 msg_scroll = TRUE; /* always scroll up, don't overwrite */ |
16997 msg_str((char_u *)_("continuing in %s"), sourcing_name); | 16993 smsg((char_u *)_("continuing in %s"), sourcing_name); |
16998 msg_puts((char_u *)"\n"); /* don't overwrite this either */ | 16994 msg_puts((char_u *)"\n"); /* don't overwrite this either */ |
16999 cmdline_row = msg_row; | 16995 cmdline_row = msg_row; |
17000 --no_wait_return; | 16996 --no_wait_return; |
17001 } | 16997 } |
17002 | 16998 |