Structures renamed according to style guide.

Structures renamed according to style guide and forward declaration
moved from header (where they are not needed) to implementation.
This commit is contained in:
Johan Wikman
2015-10-21 13:28:04 +03:00
parent f47b6324a1
commit ba23fc6fa2
2 changed files with 16 additions and 15 deletions

View File

@ -93,6 +93,13 @@ char* shmem_id_str = NULL;
char* syslog_id_str = strdup("LOGFILE_ERROR"); char* syslog_id_str = strdup("LOGFILE_ERROR");
char* syslog_ident_str = NULL; char* syslog_ident_str = NULL;
/** Forward declarations
*/
typedef struct filewriter filewriter_t;
typedef struct logfile logfile_t;
typedef struct fnames_conf fnames_conf_t;
typedef struct logmanager logmanager_t;
/** /**
* Global log manager pointer and lock variable. * Global log manager pointer and lock variable.
* lmlock protects logmanager access. * lmlock protects logmanager access.
@ -114,7 +121,7 @@ static int log_augmentation = default_log_augmentation;
static bool fatal_error = false; static bool fatal_error = false;
/** Writer thread structure */ /** Writer thread structure */
struct filewriter_st struct filewriter
{ {
#if defined(SS_DEBUG) #if defined(SS_DEBUG)
skygw_chk_t fwr_chk_top; skygw_chk_t fwr_chk_top;
@ -137,7 +144,7 @@ struct filewriter_st
* Log client's string is copied to block-sized log buffer, which is passed * Log client's string is copied to block-sized log buffer, which is passed
* to file writer thread. * to file writer thread.
*/ */
typedef struct blockbuf_st typedef struct blockbuf
{ {
#if defined(SS_DEBUG) #if defined(SS_DEBUG)
skygw_chk_t bb_chk_top; skygw_chk_t bb_chk_top;
@ -160,7 +167,7 @@ typedef struct blockbuf_st
* logfile object corresponds to physical file(s) where * logfile object corresponds to physical file(s) where
* certain log is written. * certain log is written.
*/ */
struct logfile_st struct logfile
{ {
#if defined(SS_DEBUG) #if defined(SS_DEBUG)
skygw_chk_t lf_chk_top; skygw_chk_t lf_chk_top;
@ -196,7 +203,7 @@ struct logfile_st
}; };
struct fnames_conf_st struct fnames_conf
{ {
#if defined(SS_DEBUG) #if defined(SS_DEBUG)
skygw_chk_t fn_chk_top; skygw_chk_t fn_chk_top;
@ -216,7 +223,7 @@ struct fnames_conf_st
#endif #endif
}; };
struct logmanager_st struct logmanager
{ {
#if defined(SS_DEBUG) #if defined(SS_DEBUG)
skygw_chk_t lm_chk_top; skygw_chk_t lm_chk_top;
@ -241,13 +248,12 @@ struct logmanager_st
* Type definition for string part. It is used in forming the log file name * Type definition for string part. It is used in forming the log file name
* from string parts provided by the client of log manager, as arguments. * from string parts provided by the client of log manager, as arguments.
*/ */
typedef struct strpart_st strpart_t;
struct strpart_st typedef struct strpart
{ {
char* sp_string; char* sp_string;
strpart_t* sp_next; struct strpart* sp_next;
}; } strpart_t;
/** Static function declarations */ /** Static function declarations */

View File

@ -25,11 +25,6 @@
#define STRERROR_BUFLEN 512 #define STRERROR_BUFLEN 512
#endif #endif
typedef struct filewriter_st filewriter_t;
typedef struct logfile_st logfile_t;
typedef struct fnames_conf_st fnames_conf_t;
typedef struct logmanager_st logmanager_t;
typedef enum typedef enum
{ {
BB_READY = 0x00, BB_READY = 0x00,