X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=doc%2FCodingStyle;fp=doc%2FCodingStyle;h=cf4e865a99ef081e1048f5af0a907467353083b7;hb=2c6a7600ae4f30afd9dc142b98f88bd7c6911e9a;hp=e6033530145e79dc41726f16e4221184201c5c1e;hpb=5ccd59b5c58b686575044ff76e516884df8aa705;p=silc.git diff --git a/doc/CodingStyle b/doc/CodingStyle index e6033530..cf4e865a 100644 --- a/doc/CodingStyle +++ b/doc/CodingStyle @@ -152,7 +152,7 @@ The is the module you are programming currently. You should have a pretty good idea what you are programming and what the module does. For example, , , , , etc. -The is the describtion of the functionality of the function +The is the description of the functionality of the function you are writing. Naturally it should be self explanatory and weird short names should be avoided. It is better to have long function names than some odd name that does not tell what it is about. Function @@ -305,7 +305,8 @@ that looks good. Here are some issues on general appearance. o If you are not sure about how something should be done or the code you've done is not finished, it should be commented - with XXX plus explanation what is going on. + with XXX plus explanation what is going on. For example, + /* XXX hmm... how is this flushed? */ Source Files @@ -336,6 +337,14 @@ functions if any of those exist. After macros should include the public prototypes of the functions. Go see any header file as an example. +Using gotos +=========== + +Gotos are used in the SILC code quite often. If you know how to use +goto's properly then it is ok to use them for example to optimize the +code. However, if you don' know how to use goto's do not use them. + + Debug Messages ==============