about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-02-27 08:59:17 +0000
committerEric Wong <normalperson@yhbt.net>2011-02-27 08:59:17 +0000
commit1f1298434529a0fdcaab9a33c0fe844b5dab9a42 (patch)
treee767a7dadcc3abaeeadcee50590f02df787c81df
parent3349e337fa0373abb936c3f8540e23613229178e (diff)
downloadmahoro-1f1298434529a0fdcaab9a33c0fe844b5dab9a42.tar.gz
better rdoc for constants
-rw-r--r--mahoro.c55
1 files 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