mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-06 09:30:29 +02:00
* Use scm_tc3_* codes instead of hardcoded values.
This commit is contained in:
parent
01449aa511
commit
e34f941a3a
2 changed files with 25 additions and 12 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2000-12-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
|
* print.c (scm_iprin1): Use scm_tc3_* codes instead of hardcoded
|
||||||
|
values. Added comment about tc3 codes that may appear in
|
||||||
|
immediates. Got rid of one goto command.
|
||||||
|
|
||||||
2000-12-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
2000-12-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||||
|
|
||||||
* dynl.c (sysdep_dynl_link): Improved error reporting.
|
* dynl.c (sysdep_dynl_link): Improved error reporting.
|
||||||
|
|
|
@ -312,16 +312,24 @@ scm_iprin1 (SCM exp, SCM port, scm_print_state *pstate)
|
||||||
taloop:
|
taloop:
|
||||||
switch (SCM_ITAG3 (exp))
|
switch (SCM_ITAG3 (exp))
|
||||||
{
|
{
|
||||||
case 2:
|
case scm_tc3_closure:
|
||||||
case 6:
|
case scm_tc3_tc7_1:
|
||||||
|
case scm_tc3_tc7_2:
|
||||||
|
/* These tc3 tags should never occur in an immediate value. They are
|
||||||
|
* only used in cell types of non-immediates, i. e. the value returned
|
||||||
|
* by SCM_CELL_TYPE (exp) can use these tags.
|
||||||
|
*/
|
||||||
|
scm_ipruk ("immediate", exp, port);
|
||||||
|
break;
|
||||||
|
case scm_tc3_int_1:
|
||||||
|
case scm_tc3_int_2:
|
||||||
scm_intprint (SCM_INUM (exp), 10, port);
|
scm_intprint (SCM_INUM (exp), 10, port);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case scm_tc3_imm24:
|
||||||
if (SCM_CHARP (exp))
|
if (SCM_CHARP (exp))
|
||||||
{
|
{
|
||||||
register long i;
|
long i = SCM_CHAR (exp);
|
||||||
|
|
||||||
i = SCM_CHAR (exp);
|
|
||||||
if (SCM_WRITINGP (pstate))
|
if (SCM_WRITINGP (pstate))
|
||||||
{
|
{
|
||||||
scm_puts ("#\\", port);
|
scm_puts ("#\\", port);
|
||||||
|
@ -350,18 +358,17 @@ taloop:
|
||||||
scm_intprint (SCM_IDIST (exp), 10, port);
|
scm_intprint (SCM_IDIST (exp), 10, port);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
goto idef;
|
{
|
||||||
|
/* unknown immediate value */
|
||||||
|
scm_ipruk ("immediate", exp, port);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case scm_tc3_cons_gloc:
|
||||||
/* gloc */
|
/* gloc */
|
||||||
scm_puts ("#@", port);
|
scm_puts ("#@", port);
|
||||||
exp = SCM_GLOC_SYM (exp);
|
exp = SCM_GLOC_SYM (exp);
|
||||||
goto taloop;
|
goto taloop;
|
||||||
default:
|
case scm_tc3_cons:
|
||||||
idef:
|
|
||||||
scm_ipruk ("immediate", exp, port);
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
switch (SCM_TYP7 (exp))
|
switch (SCM_TYP7 (exp))
|
||||||
{
|
{
|
||||||
case scm_tcs_cons_gloc:
|
case scm_tcs_cons_gloc:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue