List:Commits« Previous MessageNext Message »
From:Jonathan Perkin Date:February 27 2009 2:39pm
Subject:bzr commit into mysql-6.0 branch (jperkin:3065)
View as plain text  
#At file:///net/helheim/store/bteam/bzr/mysql-6.0.10-alpha-release/

 3065 Jonathan Perkin	2009-02-27
       - more C++ comment fixes in C files.
       - don't redefine TRUE/FALSE
modified:
  sql/backup/stream_v1.c
  sql/backup/stream_v1.h
  sql/backup/stream_v1_transport.c

=== modified file 'sql/backup/stream_v1.c'
--- a/sql/backup/stream_v1.c	2008-12-18 21:46:36 +0000
+++ b/sql/backup/stream_v1.c	2009-02-27 13:38:57 +0000
@@ -19,7 +19,7 @@
 # define ASSERT(X)
 #else
 # include <assert.h>
-/// Macro to map assertion call when debug is off.
+/** Macro to map assertion call when debug is off. */
 # define ASSERT(X) assert(X)
 #endif
 
@@ -33,12 +33,16 @@
 
 /* local types */
 
-typedef unsigned char bool; ///< definition of bool
-#define TRUE    1  ///< definition of true
-#define FALSE   0  ///< definition of false
+typedef unsigned char bool; /**< definition of bool */
+#ifndef TRUE
+#define TRUE    1  /**< definition of true */
+#endif
+#ifndef FALSE
+#define FALSE   0  /**< definition of false */
+#endif
 
-typedef bstream_byte byte;  ///< type definition of bstream byte
-typedef bstream_blob blob;  ///< type definition of bstream blob
+typedef bstream_byte byte;  /**< type definition of bstream byte */
+typedef bstream_blob blob;  /**< type definition of bstream blob */
 
 /**
   Macro mapping bzro() to memset().
@@ -55,20 +59,20 @@ typedef bstream_blob blob;  ///< type de
   error.
 */
 
-/// Macro to check write result.
+/** Macro to check write result. */
 #define CHECK_WR_RES(X) \
   do{\
    if ((ret= X) != BSTREAM_OK) goto wr_error;\
   } while(0)
 
-/// Macro to check read ok return.
+/** Macro to check read ok return. */
 #define CHECK_RD_OK(X) \
  do{\
    if ((ret= X) != BSTREAM_OK)\
     { ret=BSTREAM_ERROR; goto rd_error; }\
  } while(0)
 
-/// Macro to check read result.
+/** Macro to check read result. */
 #define CHECK_RD_RES(X) \
  do{\
    if ((ret= X) == BSTREAM_ERROR) goto rd_error;\
@@ -623,7 +627,7 @@ int bstream_rd_image_info(backup_stream 
   @endverbatim
 */
 
-/// Definition of extra data flag bits.
+/** Definition of extra data flag bits. */
 #define BSTREAM_FLAG_HAS_EXTRA_DATA   0x80
 
 int bstream_wr_db_catalogue(backup_stream*, struct st_bstream_image_header*,
@@ -1418,7 +1422,7 @@ int bstream_rd_meta_data(backup_stream *
   @endverbatim
 */
 
-/// Definition of create statement flag bits.
+/** Definition of create statement flag bits. */
 #define BSTREAM_FLAG_HAS_CREATE_STMT 0x40
 
 /**

=== modified file 'sql/backup/stream_v1.h'
--- a/sql/backup/stream_v1.h	2009-02-27 13:02:40 +0000
+++ b/sql/backup/stream_v1.h	2009-02-27 13:38:57 +0000
@@ -98,10 +98,10 @@ enum enum_bstream_ret_codes {
 */
 struct st_server_version
 {
-  unsigned short int  major;   ///< major level
-  unsigned short int  minor;   ///< minor level
-  unsigned short int  release; ///< release level
-  bstream_blob        extra;   ///< extra data about the server
+  unsigned short int  major;   /**< major level */
+  unsigned short int  minor;   /**< minor level */
+  unsigned short int  release; /**< release level */
+  bstream_blob        extra;   /**< extra data about the server */
 };
 
 /**
@@ -250,7 +250,7 @@ struct st_bstream_item_info
 */
 struct st_bstream_ts_info
 {
-  struct st_bstream_item_info  base;  ///< The base of the info class.
+  struct st_bstream_item_info  base;  /**< The base of the info class. */
 };
 
 /**
@@ -260,7 +260,7 @@ struct st_bstream_ts_info
 */
 struct st_bstream_db_info
 {
-  struct st_bstream_item_info  base;  ///< The base of the info class.
+  struct st_bstream_item_info  base;  /**< The base of the info class. */
 };
 
 
@@ -407,11 +407,11 @@ int bstream_next_chunk(backup_stream*);
  */
 struct st_abstract_stream
 {
-  /// Pointer to write method.
+  /** Pointer to write method. */
   int (*write)(void*, bstream_blob*, bstream_blob); 
-  /// Pointer to read method.
+  /** Pointer to read method. */
   int (*read)(void*, bstream_blob*, bstream_blob);
-  /// Pointer to forward method.
+  /** Pointer to forward method. */
   int (*forward)(void*, unsigned long int*);
 };
 
@@ -421,10 +421,10 @@ struct st_abstract_stream
 */
 struct st_bstream_buffer
 {
-  bstream_byte  *begin;   ///< pointer to start of stream buffer
-  bstream_byte  *pos;     ///< current position in buffer
-  bstream_byte  *header;  ///< pointer to header
-  bstream_byte  *end;     ///< pointer to end of stream buffer
+  bstream_byte  *begin;   /**< pointer to start of stream buffer */
+  bstream_byte  *pos;     /**< current position in buffer */
+  bstream_byte  *header;  /**< pointer to header */
+  bstream_byte  *end;     /**< pointer to end of stream buffer */
 };
 
 /**
@@ -432,21 +432,21 @@ struct st_bstream_buffer
 */
 struct st_backup_stream
 {
-  struct st_abstract_stream stream; ///< stream metadata
-  unsigned long int block_size;     ///< block size
-  short int init_block_count;       ///< initial block count
-  /// Enumeration for state of the stream
-  enum { CLOSED,         ///< stream has been closed 
-         FIRST_BLOCK,    ///< reading/writing the first block of a stream 
-         NORMAL,         ///< normal operation 
-         LAST_FRAGMENT,  ///< reading last fragment of a chunk 
-         EOS,            ///< end of stream detected 
-         ERROR } state;  ///< state of the stream
-  /// Enumeration for mode of stream (read, write).
-  enum { READING, WRITING } mode; ///< current mode.
-  struct st_bstream_buffer buf; ///< stream buffer
-  bstream_blob mem;             ///< pointer to location in buffer
-  bstream_blob data_buf;        ///< pointer to data buffer
+  struct st_abstract_stream stream; /**< stream metadata */
+  unsigned long int block_size;     /**< block size */
+  short int init_block_count;       /**< initial block count */
+  /** Enumeration for state of the stream */
+  enum { CLOSED,         /**< stream has been closed */
+         FIRST_BLOCK,    /**< reading/writing the first block of a stream */
+         NORMAL,         /**< normal operation */
+         LAST_FRAGMENT,  /**< reading last fragment of a chunk */
+         EOS,            /**< end of stream detected */
+         ERROR } state;  /**< state of the stream */
+  /** Enumeration for mode of stream (read, write). */
+  enum { READING, WRITING } mode; /**< current mode. */
+  struct st_bstream_buffer buf; /**< stream buffer */
+  bstream_blob mem;             /**< pointer to location in buffer */
+  bstream_blob data_buf;        /**< pointer to data buffer */
 };
 
 int bstream_open_wr(backup_stream*, unsigned long int, unsigned long int);

=== modified file 'sql/backup/stream_v1_transport.c'
--- a/sql/backup/stream_v1_transport.c	2009-01-20 11:36:32 +0000
+++ b/sql/backup/stream_v1_transport.c	2009-02-27 13:38:57 +0000
@@ -20,7 +20,7 @@
 # define ASSERT(X)
 #else
 # include <assert.h>
-/// Macro to map assertion call when debug is off.
+/** Macro to map assertion call when debug is off. */
 # define ASSERT(X) assert(X)
 #endif
 
@@ -68,12 +68,16 @@
 
 /* Local type definitions. */
 
-#define TRUE    1  ///< definition of true
-#define FALSE   0  ///< definition of false
+#ifndef TRUE
+#define TRUE    1  /**< definition of true */
+#endif
+#ifndef FALSE
+#define FALSE   0  /**< definition of false */
+#endif
 
-typedef unsigned char bool; ///< Type definition of unsigned character to bool.
-typedef bstream_byte byte;  ///< Type definition of bstream_byte to byte.
-typedef bstream_blob blob;  ///< Type definition of bstream_blob to blob.
+typedef unsigned char bool; /**< Type definition of unsigned character to bool. */
+typedef bstream_byte byte;  /**< Type definition of bstream_byte to byte. */
+typedef bstream_blob blob;  /**< Type definition of bstream_blob to blob. */
 
 /**
   Macro mapping bzro() to memset().
@@ -174,20 +178,20 @@ extern byte get_byte_size_t(size_t value
  *
  *************************************************************************/
 
-#define FR_EOC    0x80  ///< bits for EOC fragment
-#define FR_EOS    0xC0  ///< bits for EOS fragment
-#define FR_MORE   0x00  ///< bits for MORE fragment
-#define FR_LAST   0x40  ///< bits for LAST fragment
+#define FR_EOC    0x80  /**< bits for EOC fragment */
+#define FR_EOS    0xC0  /**< bits for EOS fragment */
+#define FR_MORE   0x00  /**< bits for MORE fragment */
+#define FR_LAST   0x40  /**< bits for LAST fragment */
 
-#define FR_TYPE_MASK  0xC0  ///< type bits for mask
-#define FR_LEN_MASK   (~FR_TYPE_MASK)  ///< type length for mask
+#define FR_TYPE_MASK  0xC0  /**< type bits for mask */
+#define FR_LEN_MASK   (~FR_TYPE_MASK)  /**< type length for mask */
 
 /** biggest size of small fragment */
 #define FR_SMALL_MAX  ((size_t)FR_LEN_MASK)
-#define FR_BIG        0x80        ///< type bits for big fragment
-#define FR_HUGE       0xC0        ///< type bits for huge fragment
-#define FR_BIG_SHIFT  6           ///< value shift for big fragment 
-#define FR_HUGE_SHIFT 12          ///< value shift for huge fragment 
+#define FR_BIG        0x80        /**< type bits for big fragment */
+#define FR_HUGE       0xC0        /**< type bits for huge fragment */
+#define FR_BIG_SHIFT  6           /**< value shift for big fragment */
+#define FR_HUGE_SHIFT 12          /**< value shift for huge fragment */
 /** header for the biggest possible chunk */
 #define FR_HUGE_MAX_HDR (FR_HUGE|FR_LEN_MASK)
 /** size of the biggest possible chunk */
@@ -311,15 +315,15 @@ int read_fragment_header(byte **header)
  (parameter S) to write/read bytes to/from underlying stream.
 */
 
-/// Macro mapping as_write to write method call result.
+/** Macro mapping as_write to write method call result. */
 #define as_write(S,Data,Env) \
   ((S)->write ? (S)->write((S),(Data),(Env)) : BSTREAM_ERROR)
 
-/// Macro mapping as_read to read method call result.
+/** Macro mapping as_read to read method call result. */
 #define as_read(S,Buf,Env) \
   ((S)->read ?(S)->read((S),(Buf),(Env)) : BSTREAM_ERROR)
 
-/// Macro mapping as_forward to forward method call result.
+/** Macro mapping as_forward to forward method call result. */
 #define as_forward(S,Off) \
   ((S)->forward ? (S)->forward((S),(Off)) : (*(Off)=0, BSTREAM_ERROR))
 
@@ -584,7 +588,7 @@ int close_current_fragment(backup_stream
 
  *************************************************************************/
 
-/// Input buffer macro to check validity.
+/** Input buffer macro to check validity. */
 #define IBUF_INV(B) \
   ASSERT((B).begin <= (B).pos); \
   ASSERT((B).begin <= (B).header); \

Thread
bzr commit into mysql-6.0 branch (jperkin:3065) Jonathan Perkin27 Feb 2009