Badly punctuated parameter list in #define

Sometimes working with an old c compiler brings up painful, yet fun-filled days of making it speak the same language as you, and sometimes you just go “*$&%*$#&% you piece of sh** compiler” I had one such moment today, and after I had returned to Zen (some soul-searching and some google searching), I realized it quite simple. $ gmake ... ... some_file.h:42: badly punctuated parameter list in \`#define' some_file.h:64: badly punctuated parameter list in \`#define' Failed to compile $ This was caused by the following:

Read More

Power of 2

It’s been a while since I’ve done anything except write code – lots of it. The last 20 days have been insane, and ofcourse to a take a break from writing code, I like to read code that others write. (You DO know that I’m crazy, right?!). In one of my futile attempts at clearing my google-reader reading list, I chanced upon a post by Veerabahu, on finding if a number is a power of 2 (or not).

Read More

cvs - Getting list of files changed in the current tree

The simple way to retreive the list of changed files would be to update the tree, which would then list the files updated. #cvs update . > filelist.dat The problem with this, is that if there have been changes to other files after your last update, you will have to manually glean the files that you have changed. I tend face this, particularly during the last couple of weeks before a release, since you don’t want to risk updating your tree everyday, but still have to make 2/3 checkins.

Read More