--- On Sat, 3/28/09, Shakthi Kannan <shakthimaan@xxxxxxxxx> wrote:
From: Shakthi Kannan <shakthimaan@xxxxxxxxx>
Subject: Re: [Ilugc] Webattery for laptop users
To: "ILUG-C" <ilugc@xxxxxxxxxxxxx>
Date: Saturday, March 28, 2009, 12:26 AM
Hi,
--- On Sat, Mar 28, 2009 at 9:46 AM, sky knight <sky_knight02@xxxxxxxxx> wrote:
| I would like to present Webattery, a command line tool for
displaying battery power of
| laptops. The source can be found in following link
|
| http://webattery.sourceforge.net/
|
| Negatives of this project is what I need to improve it well.
\--
* Please initialize your global variables. Pointer variables need to
be initialized to NULL.
* Don't use magic numbers like "/proc/acpi/battery". Please #define
them before you use them.
* What happens if /proc is not mounted or not available on a system?
Recent distros use sysfs.
* You need to check return status of function calls before you use them!
* Your coding style needs to be consistent. Please try to follow one.
* You put comments in webattery.h file, but, there are no comments in
webattery.c! Atleast put a comment line before each function stating
what it does.
* You need to have autotools sources (configure.ac, Makefile.am) in
your sources directory. It needs to check for presence of header,
library files, gcc etc.
* Your install target in your Makefile requires sudo for "cp -f
webattery /bin/". The same for linking that you do.
* You also need an uninstall target in your Makefile.
* README, and INSTALL files don't require a license header. You
already have put a LICENSE file in your sources directory.
* It is good to keep code within 80x25, for readability reasons.
* In future, before you do a project please do check if any such FOSS
tool exists. Re-inventing the wheel is not encouraged.
This is what I expected.
Thanks for your reply SK
-Alagunambi Welkin-