* Separate the handling of OPEN flags between ports and directories.
[bpt/guile.git] / libguile / filesys.h
index 67bbc74..c71d844 100644 (file)
 \f
 
 extern scm_bits_t scm_tc16_dir;
+
+#define SCM_DIR_FLAG_OPEN (1L << 16)
+
 #define SCM_DIRP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_dir))
-#define SCM_OPDIRP(x) (!SCM_IMP (x) && (SCM_CELL_WORD_0 (x) == (scm_tc16_dir | SCM_OPN)))
+#define SCM_DIR_OPEN_P(x) (SCM_CELL_WORD_0 (x) & SCM_DIR_FLAG_OPEN)
 
 \f
 
@@ -90,6 +93,14 @@ extern SCM scm_basename (SCM filename, SCM suffix);
 
 extern void scm_init_filesys (void);
 
+\f
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
+#define SCM_OPDIRP(x) (SCM_DIRP (x) && (SCM_DIR_OPEN_P (x)))
+
+#endif  /* SCM_DEBUG_DEPRECATED == 0 */
+
 #endif  /* FILESYSH */
 
 /*