summaryrefslogtreecommitdiffstats
path: root/unif.c
diff options
context:
space:
mode:
Diffstat (limited to 'unif.c')
-rw-r--r--unif.c57
1 files changed, 34 insertions, 23 deletions
diff --git a/unif.c b/unif.c
index 86ae50a..200b9b3 100644
--- a/unif.c
+++ b/unif.c
@@ -57,7 +57,9 @@ complex double cvect
#ifndef STDC_HEADERS
int ungetc P((int c, FILE *stream));
+# ifndef sun
sizet fwrite ();
+# endif
#endif
long tc16_array = 0;
@@ -146,12 +148,17 @@ SCM makflo (x)
long scm_prot2type(prot)
SCM prot;
{
- if (BOOL_T==prot) return tc7_bvect;
if ICHRP(prot) return tc7_string;
- if (MAKINUM(32L)==prot) return tc7_uvect;
- if (MAKINUM(-32L)==prot) return tc7_ivect;
- if (MAKINUM(-16L)==prot) return tc7_svect;
- if INUMP(prot) return INUM(prot) > 0 ? tc7_uvect : tc7_ivect;
+ switch (prot) {
+ case BOOL_T: return tc7_bvect;
+ case MAKINUM(8L):
+ case MAKINUM(16L):
+ case MAKINUM(32L): return tc7_uvect;
+ case MAKINUM(-32L): return tc7_ivect;
+ case MAKINUM(-16L): return tc7_svect;
+ case MAKINUM(-8L): return tc7_svect;
+ }
+ /* if INUMP(prot) return INUM(prot) > 0 ? tc7_uvect : tc7_ivect; */
if IMP(prot) return tc7_vector;
# ifdef FLOATS
if INEXP(prot) {
@@ -1846,26 +1853,30 @@ int raprin1(exp, port, writing)
}
return 1;
}
- else
- lputs("At", port); break;
- case tc7_vector:
- lputc('A', port); break;
- case tc7_string:
- lputs("A\\", port); break;
- case tc7_uvect:
- lputs("Au32", port); break;
- case tc7_ivect:
- lputs("As32", port); break;
- case tc7_svect:
- lputs("As16", port); break;
+ default:
+ if (exp==v) lputc('1', port);
+ switch TYP7(v) {
+ case tc7_bvect:
+ lputs("A:bool", port); break;
+ case tc7_vector:
+ lputc('A', port); break;
+ case tc7_string:
+ lputs("A:char", port); break;
+ case tc7_uvect:
+ lputs("A:fixN32b", port); break;
+ case tc7_ivect:
+ lputs("A:fixZ32b", port); break;
+ case tc7_svect:
+ lputs("A:fixZ16b", port); break;
# ifdef FLOATS
- case tc7_fvect:
- lputs("Ar32", port); break;
- case tc7_dvect:
- lputs("Ar64", port); break;
- case tc7_cvect:
- lputs("Ac64", port); break;
+ case tc7_fvect:
+ lputs("A:floR32b", port); break;
+ case tc7_dvect:
+ lputs("A:floR64b", port); break;
+ case tc7_cvect:
+ lputs("A:floC64b", port); break;
# endif /*FLOATS*/
+ }
}
if ((v != exp) && 0==ARRAY_NDIM(exp)) {
lputc(' ', port);