From 1f1298434529a0fdcaab9a33c0fe844b5dab9a42 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 27 Feb 2011 08:59:17 +0000 Subject: better rdoc for constants --- mahoro.c | 55 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/mahoro.c b/mahoro.c index 3971fdd..156e32a 100644 --- a/mahoro.c +++ b/mahoro.c @@ -184,8 +184,11 @@ void Init_mahoro(void) /* Look at the contents of devices */ rb_define_const(cMahoro, "DEVICES", INT2FIX(MAGIC_DEVICES)); - /* Return only the MIME type */ #ifdef MAGIC_MIME_TYPE + /* + * Return only the MIME type + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "MIME_TYPE", INT2FIX(MAGIC_MIME_TYPE)); #endif @@ -216,7 +219,10 @@ void Init_mahoro(void) rb_define_const(cMahoro, "ERROR", INT2FIX(MAGIC_ERROR)); #ifdef MAGIC_MIME_ENCODING - /* return a MIME encoding, instead of a textual description. */ + /* + * Return a MIME encoding, instead of a textual description. + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "MIME_ENCODING", INT2FIX(MAGIC_MIME_ENCODING)); #endif @@ -224,51 +230,78 @@ void Init_mahoro(void) rb_define_const(cMahoro, "MIME", INT2FIX(MAGIC_MIME)); #ifdef MAGIC_APPLE - /* return both Apple creator and type */ + /* + * Return both Apple creator and type. + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "APPLE", INT2FIX(MAGIC_APPLE)); #endif #ifdef MAGIC_NO_CHECK_COMPRESS - /* Don't check for or inside compressed files */ + /* + * Don't check for or inside compressed files. + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "NO_CHECK_COMPRESS", INT2FIX(MAGIC_NO_CHECK_COMPRESS)); #endif #ifdef MAGIC_NO_CHECK_TAR - /* Don't examine tar files */ + /* + * Don't examine tar files. + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "NO_CHECK_TAR", INT2FIX(MAGIC_NO_CHECK_TAR)); #endif #ifdef MAGIC_NO_CHECK_SOFT - /* Don't consult magic files */ + /* + * Don't consult magic files. + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "NO_CHECK_SOFT", INT2FIX(MAGIC_NO_CHECK_SOFT)); #endif #ifdef MAGIC_NO_CHECK_APPTYPE - /* Don't check application type (EMX only) */ + /* + * Don't check application type (EMX only). + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "NO_CHECK_APPTYPE", INT2FIX(MAGIC_NO_CHECK_APPTYPE)); #endif #ifdef MAGIC_NO_CHECK_ELF - /* Don't check for ELF details */ + /* + * Don't check for ELF details. + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "NO_CHECK_ELF", INT2FIX(MAGIC_NO_CHECK_ELF)); #endif #ifdef MAGIC_NO_CHECK_ASCII - /* Don't check for various types of ASCII files */ + /* + * Don't check for various types of ASCII text files. + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "NO_CHECK_TEXT", INT2FIX(MAGIC_NO_CHECK_ASCII)); #endif #ifdef MAGIC_NO_CHECK_TOKENS - /* Don't check for known tokens inside ASCII files */ + /* + * Don't check for known tokens inside ASCII files. + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "NO_CHECK_TOKENS", INT2FIX(MAGIC_NO_CHECK_TOKENS)); #endif #ifdef MAGIC_NO_CHECK_ENCODING - /* Don't check for text encodings */ + /* + * Don't check for text encodings. + * This constant may not be defined on older systems. + */ rb_define_const(cMahoro, "NO_CHECK_ENCODING", INT2FIX(MAGIC_NO_CHECK_ENCODING)); #endif -- cgit v1.2.3-24-ge0c7