From: Henrik Nordstrom Date: Mon, 27 Jul 2009 21:50:59 +0000 (+0200) Subject: Use typedefs of the relevant enums for store_status, swap_status and ping_status... X-Git-Tag: SQUID_3_2_0_1~831 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1398b75d8d6a8b6a3c5c94be004597a946c7829;p=thirdparty%2Fsquid.git Use typedefs of the relevant enums for store_status, swap_status and ping_status to make debugging easier (symbolic states instead of numbers) --- diff --git a/src/Store.h b/src/Store.h index fde6afcb33..16ad35b58a 100644 --- a/src/Store.h +++ b/src/Store.h @@ -60,8 +60,6 @@ class MemObject; class Store; class StoreSearch; -typedef unsigned int ping_status_t; - /** \ingroup StoreAPI */ @@ -141,24 +139,19 @@ public: u_short flags; /* END OF ON-DISK STORE_META_STD */ -sfileno swap_filen: - 25; + sfileno swap_filen:25; + + sdirno swap_dirn:7; -sdirno swap_dirn: - 7; u_short lock_count; /* Assume < 65536! */ -mem_status_t mem_status: - 3; + mem_status_t mem_status:3; -ping_status_t ping_status: - 3; + ping_status_t ping_status:3; -store_status_t store_status: - 3; + store_status_t store_status:3; -swap_status_t swap_status: - 3; + swap_status_t swap_status:3; public: static size_t inUseCount(); diff --git a/src/enums.h b/src/enums.h index 1de8ef8d93..3184fada41 100644 --- a/src/enums.h +++ b/src/enums.h @@ -216,22 +216,22 @@ typedef enum _mem_status_t { IN_MEMORY } mem_status_t; -enum { +typedef enum { PING_NONE, PING_WAITING, PING_DONE -}; +} ping_status_t; -enum { +typedef enum { STORE_OK, STORE_PENDING -}; +} store_status_t; -enum { +typedef enum { SWAPOUT_NONE, SWAPOUT_WRITING, SWAPOUT_DONE -}; +} swap_status_t; typedef enum { STORE_NON_CLIENT, diff --git a/src/typedefs.h b/src/typedefs.h index 8925243713..9c8fb001a0 100644 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -36,9 +36,6 @@ #ifndef SQUID_TYPEDEFS_H #define SQUID_TYPEDEFS_H -typedef unsigned int store_status_t; -//MOVED src/Store.h (only use) typedef unsigned int ping_status_t; -typedef unsigned int swap_status_t; typedef signed int sfileno; typedef signed int sdirno;