summaryrefslogtreecommitdiff
path: root/libguile/filesys.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-07-23 15:43:02 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-07-23 15:43:02 +0000
commite11e83f3d99305ada6354cae7123fb8c0e998703 (patch)
tree23dccd2a0fd1741abb8561214acadc347036480b /libguile/filesys.c
parent928e0f421070bb610f3375d5808a6378d5edfa1b (diff)
downloadguile-e11e83f3d99305ada6354cae7123fb8c0e998703.tar.gz
* deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated versions to deprecated.h and deprecated.c. Changed all uses to either use the SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
Diffstat (limited to 'libguile/filesys.c')
-rw-r--r--libguile/filesys.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 7ae482288..79cfa0131 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -299,7 +299,7 @@ SCM_DEFINE (scm_open_fdes, "open-fdes", 2, 1, 0,
SCM_SYSCALL (fd = open (SCM_STRING_CHARS (path), iflags, imode));
if (fd == -1)
SCM_SYSERROR;
- return SCM_I_MAKINUM (fd);
+ return scm_from_int (fd);
}
#undef FUNC_NAME
@@ -336,7 +336,7 @@ SCM_DEFINE (scm_open, "open", 2, 1, 0,
int fd;
int iflags;
- fd = SCM_INUM (scm_open_fdes (path, flags, mode));
+ fd = scm_to_int (scm_open_fdes (path, flags, mode));
iflags = SCM_NUM2INT (2, flags);
if (iflags & O_RDWR)
{
@@ -476,7 +476,7 @@ scm_stat2scm (struct stat *stat_temp)
else
SCM_VECTOR_SET(ans, 13, scm_sym_unknown);
- SCM_VECTOR_SET(ans, 14, SCM_I_MAKINUM ((~S_IFMT) & mode));
+ SCM_VECTOR_SET(ans, 14, scm_from_int ((~S_IFMT) & mode));
/* the layout of the bits in ve[14] is intended to be portable.
If there are systems that don't follow the usual convention,
@@ -505,7 +505,7 @@ scm_stat2scm (struct stat *stat_temp)
tmp <<= 1;
if (S_IXOTH & mode) tmp += 1;
- SCM_VECTOR_SET(ans, 14, SCM_I_MAKINUM (tmp));
+ SCM_VECTOR_SET(ans, 14, scm_from_int (tmp));
*/
}
@@ -602,12 +602,12 @@ SCM_DEFINE (scm_stat, "stat", 1, 0, 0,
int fdes;
struct stat stat_temp;
- if (SCM_INUMP (object))
+ if (scm_is_integer (object))
{
#ifdef __MINGW32__
- SCM_SYSCALL (rv = fstat_Win32 (SCM_INUM (object), &stat_temp));
+ SCM_SYSCALL (rv = fstat_Win32 (scm_to_int (object), &stat_temp));
#else
- SCM_SYSCALL (rv = fstat (SCM_INUM (object), &stat_temp));
+ SCM_SYSCALL (rv = fstat (scm_to_int (object), &stat_temp));
#endif
}
else if (SCM_STRINGP (object))
@@ -974,9 +974,9 @@ set_element (SELECT_TYPE *set, SCM *ports_ready, SCM element, int pos)
{
int fd;
- if (SCM_INUMP (element))
+ if (scm_is_integer (element))
{
- fd = SCM_INUM (element);
+ fd = scm_to_int (element);
}
else
{
@@ -1055,9 +1055,9 @@ get_element (SELECT_TYPE *set, SCM element, SCM list)
{
int fd;
- if (SCM_INUMP (element))
+ if (scm_is_integer (element))
{
- fd = SCM_INUM (element);
+ fd = scm_to_int (element);
}
else
{
@@ -1478,12 +1478,12 @@ SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0,
#else
if (len > 0 && s[0] == '/')
#endif /* ndef __MINGW32__ */
- return scm_substring (filename, SCM_INUM0, SCM_I_MAKINUM (1));
+ return scm_substring (filename, SCM_INUM0, scm_from_int (1));
else
return scm_dot_string;
}
else
- return scm_substring (filename, SCM_INUM0, SCM_I_MAKINUM (i + 1));
+ return scm_substring (filename, SCM_INUM0, scm_from_int (i + 1));
}
#undef FUNC_NAME
@@ -1532,12 +1532,12 @@ SCM_DEFINE (scm_basename, "basename", 1, 1, 0,
#else
if (len > 0 && f[0] == '/')
#endif /* ndef __MINGW32__ */
- return scm_substring (filename, SCM_INUM0, SCM_I_MAKINUM (1));
+ return scm_substring (filename, SCM_INUM0, scm_from_int (1));
else
return scm_dot_string;
}
else
- return scm_substring (filename, SCM_I_MAKINUM (i + 1), SCM_I_MAKINUM (end + 1));
+ return scm_substring (filename, scm_from_int (i+1), scm_from_int (end+1));
}
#undef FUNC_NAME