aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README28
1 files changed, 28 insertions, 0 deletions
diff --git a/README b/README
index 49be3fd..1be0d2c 100644
--- a/README
+++ b/README
@@ -60,3 +60,31 @@ following additional programs are required:
To build b/EpisodeBrowser.exe, issue `make' in the root directory of
the project.
+
+Hacking
+~~~~~~~
+The Episode Browser source code uses a limited form of Hungarian
+notation. In summary, Hungarian notation is used only for
+
+ - traditional Win32 names such as uMsg, lParam, hWnd,
+ - variables of Windows-specific types, like hfNormal (HFONT),
+ - arrays, such as vTipCtx (read as: context tip vector),
+ - booleans, such as bActive, bViewWatched,
+ - counts, such as cb (byte count), cch (character count), and
+ - type disambiguation.
+
+For an example of the last point, imagine you have an integer named
+`rating', which you want to convert to a string. What should the
+string be called? The simple answer is `sRating'.
+
+In addition, global variables are prefixed with g_ and non-public
+member variables are prefixed with m_.
+
+A special note on the meaning of cb and cch: these prefixes are used
+to designate size. For strings, this means the total size, including
+space for the terminating NUL character. To designate string length
+without NUL, `len' is used.
+
+While specific Hungarian prefixes are unnecessary for most variables,
+"natural" word order should be avoided. In other words, lenString is
+preferred over stringLen, because it mirrors vString.