summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-12-08 12:14:27 -0800
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-12-08 12:14:27 -0800
commit95cc317b087e863f6e0a4ab4db7ab68f06a9d969 (patch)
tree34662270cb6698acaa33a966c25f932de18e3320 /dive.h
parent1cb9fc7fb4cfc919cc7880d0af3a66a2f7f107cf (diff)
parent52748412fff0974fbc76b3f0a72cd0ba58b37771 (diff)
downloadsubsurface-95cc317b087e863f6e0a4ab4db7ab68f06a9d969.tar.gz
Merge branch 'stars' of git://git.hohndel.org/subsurface
* 'stars' of git://git.hohndel.org/subsurface: Fix some issues with star rating code Add typical 0 to 5 star rating for dives Still not great editing, but other than that it looks good.
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index ccb007dcb..f0808efb4 100644
--- a/dive.h
+++ b/dive.h
@@ -199,6 +199,7 @@ struct dive {
char *location;
char *notes;
char *divemaster, *buddy;
+ int rating;
double latitude, longitude;
depth_t maxdepth, meandepth;
duration_t duration, surfacetime;
@@ -313,5 +314,14 @@ const char *monthname(int mon);
#define UTF8_DEGREE "\xc2\xb0"
#define UTF8_SUBSCRIPT_2 "\xe2\x82\x82"
+#define UTF8_WHITESTAR "\xe2\x98\x86"
+#define UTF8_BLACKSTAR "\xe2\x98\x85"
+#define ZERO_STARS UTF8_WHITESTAR UTF8_WHITESTAR UTF8_WHITESTAR UTF8_WHITESTAR UTF8_WHITESTAR
+#define ONE_STARS UTF8_BLACKSTAR UTF8_WHITESTAR UTF8_WHITESTAR UTF8_WHITESTAR UTF8_WHITESTAR
+#define TWO_STARS UTF8_BLACKSTAR UTF8_BLACKSTAR UTF8_WHITESTAR UTF8_WHITESTAR UTF8_WHITESTAR
+#define THREE_STARS UTF8_BLACKSTAR UTF8_BLACKSTAR UTF8_BLACKSTAR UTF8_WHITESTAR UTF8_WHITESTAR
+#define FOUR_STARS UTF8_BLACKSTAR UTF8_BLACKSTAR UTF8_BLACKSTAR UTF8_BLACKSTAR UTF8_WHITESTAR
+#define FIVE_STARS UTF8_BLACKSTAR UTF8_BLACKSTAR UTF8_BLACKSTAR UTF8_BLACKSTAR UTF8_BLACKSTAR
+extern const char *star_strings[];
#endif /* DIVE_H */