Mercurial > vim
comparison src/eval.c @ 1322:4ce0a7e4c6b3 v7.1.036
updated for version 7.1-036
author | vimboss |
---|---|
date | Tue, 24 Jul 2007 12:34:30 +0000 |
parents | 1f9e2c8e642a |
children | 22886f3d882d |
comparison
equal
deleted
inserted
replaced
1321:f3d7fa7dcf63 | 1322:4ce0a7e4c6b3 |
---|---|
1409 | 1409 |
1410 return tv; | 1410 return tv; |
1411 } | 1411 } |
1412 | 1412 |
1413 | 1413 |
1414 #if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) || defined(PROTO) | 1414 #if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) \ |
1415 || defined(FEAT_COMPL_FUNC) || defined(PROTO) | |
1415 /* | 1416 /* |
1416 * Call some vimL function and return the result in "*rettv". | 1417 * Call some vimL function and return the result in "*rettv". |
1417 * Uses argv[argc] for the function arguments. | 1418 * Uses argv[argc] for the function arguments. |
1418 * Returns OK or FAIL. | 1419 * Returns OK or FAIL. |
1419 */ | 1420 */ |
1482 clear_tv(rettv); | 1483 clear_tv(rettv); |
1483 | 1484 |
1484 return ret; | 1485 return ret; |
1485 } | 1486 } |
1486 | 1487 |
1488 # if (defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)) || defined(PROTO) | |
1487 /* | 1489 /* |
1488 * Call vimL function "func" and return the result as a string. | 1490 * Call vimL function "func" and return the result as a string. |
1489 * Returns NULL when calling the function fails. | 1491 * Returns NULL when calling the function fails. |
1490 * Uses argv[argc] for the function arguments. | 1492 * Uses argv[argc] for the function arguments. |
1491 */ | 1493 */ |
1504 | 1506 |
1505 retval = vim_strsave(get_tv_string(&rettv)); | 1507 retval = vim_strsave(get_tv_string(&rettv)); |
1506 clear_tv(&rettv); | 1508 clear_tv(&rettv); |
1507 return retval; | 1509 return retval; |
1508 } | 1510 } |
1509 | 1511 # endif |
1510 #if defined(FEAT_COMPL_FUNC) || defined(PROTO) | 1512 |
1513 # if defined(FEAT_COMPL_FUNC) || defined(PROTO) | |
1511 /* | 1514 /* |
1512 * Call vimL function "func" and return the result as a number. | 1515 * Call vimL function "func" and return the result as a number. |
1513 * Returns -1 when calling the function fails. | 1516 * Returns -1 when calling the function fails. |
1514 * Uses argv[argc] for the function arguments. | 1517 * Uses argv[argc] for the function arguments. |
1515 */ | 1518 */ |
1528 | 1531 |
1529 retval = get_tv_number_chk(&rettv, NULL); | 1532 retval = get_tv_number_chk(&rettv, NULL); |
1530 clear_tv(&rettv); | 1533 clear_tv(&rettv); |
1531 return retval; | 1534 return retval; |
1532 } | 1535 } |
1533 #endif | 1536 # endif |
1534 | 1537 |
1535 /* | 1538 /* |
1536 * Call vimL function "func" and return the result as a list | 1539 * Call vimL function "func" and return the result as a list |
1537 * Uses argv[argc] for the function arguments. | 1540 * Uses argv[argc] for the function arguments. |
1538 */ | 1541 */ |
1554 return NULL; | 1557 return NULL; |
1555 } | 1558 } |
1556 | 1559 |
1557 return rettv.vval.v_list; | 1560 return rettv.vval.v_list; |
1558 } | 1561 } |
1559 | 1562 #endif |
1560 #endif | 1563 |
1561 | 1564 |
1562 /* | 1565 /* |
1563 * Save the current function call pointer, and set it to NULL. | 1566 * Save the current function call pointer, and set it to NULL. |
1564 * Used when executing autocommands and for ":source". | 1567 * Used when executing autocommands and for ":source". |
1565 */ | 1568 */ |