summaryrefslogtreecommitdiff
path: root/sql/my_decimal.h
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2007-10-16 16:11:50 -0400
committerunknown <cmiller@zippy.cornsilk.net>2007-10-16 16:11:50 -0400
commit94e41712130a838e72876785d880e62dbda6ca0c (patch)
tree8b9e521083780437237f38683ce7cab9518c7e78 /sql/my_decimal.h
parent4a0ec7864ea5c97bb51954c26674f1b6db04b13f (diff)
downloadmariadb-git-94e41712130a838e72876785d880e62dbda6ca0c.tar.gz
Doxygenize comments.
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r--sql/my_decimal.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/sql/my_decimal.h b/sql/my_decimal.h
index 800ae23425b..1885036f42b 100644
--- a/sql/my_decimal.h
+++ b/sql/my_decimal.h
@@ -13,7 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/*
+/**
+ @file
+
It is interface module to fixed precision decimals library.
Most functions use 'uint mask' as parameter, if during operation error
@@ -34,14 +36,14 @@ C_MODE_END
#define DECIMAL_LONG_DIGITS 10
#define DECIMAL_LONG3_DIGITS 8
-/* maximum length of buffer in our big digits (uint32) */
+/** maximum length of buffer in our big digits (uint32). */
#define DECIMAL_BUFF_LENGTH 9
/* the number of digits that my_decimal can possibly contain */
#define DECIMAL_MAX_POSSIBLE_PRECISION (DECIMAL_BUFF_LENGTH * 9)
-/*
+/**
maximum guaranteed precision of number in decimal digits (number of our
digits * number of decimal digits in one our big digit - number of decimal
digits in one our big digit decreased by 1 (because we always put decimal
@@ -51,13 +53,14 @@ C_MODE_END
#define DECIMAL_MAX_SCALE 30
#define DECIMAL_NOT_SPECIFIED 31
-/*
+/**
maximum length of string representation (number of maximum decimal
digits + 1 position for sign + 1 position for decimal point)
*/
#define DECIMAL_MAX_STR_LENGTH (DECIMAL_MAX_POSSIBLE_PRECISION + 2)
-/*
- maximum size of packet length
+
+/**
+ maximum size of packet length.
*/
#define DECIMAL_MAX_FIELD_SIZE DECIMAL_MAX_PRECISION
@@ -78,11 +81,12 @@ inline int my_decimal_int_part(uint precision, uint decimals)
}
-/*
- my_decimal class limits 'decimal_t' type to what we need in MySQL
+/**
+ my_decimal class limits 'decimal_t' type to what we need in MySQL.
+
It contains internally all necessary space needed by the instance so
no extra memory is needed. One should call fix_buffer_pointer() function
- when he moves my_decimal objects in memory
+ when he moves my_decimal objects in memory.
*/
class my_decimal :public decimal_t
@@ -384,7 +388,10 @@ int my_decimal_mod(uint mask, my_decimal *res, const my_decimal *a,
}
-/* Returns -1 if a<b, 1 if a>b and 0 if a==b */
+/**
+ @return
+ -1 if a<b, 1 if a>b and 0 if a==b
+*/
inline
int my_decimal_cmp(const my_decimal *a, const my_decimal *b)
{