Please follow coding style when touching Gammu code. We know that there are still some parts which really do not follow it and fixes to that are also welcome.
The coding style is quite similar to what Linux kernel uses, the only major differences are requested block braces and switch indentation.
Use indentation, tab is tab and is 8 chars wide.
Try to avoid long lines (though there is currently no hard limit on line length).
int function(int x)
{
body of function
}
do {
body of do-loop
} while (condition);
if (x == y) {
..
} else if (x > y) {
...
} else {
...
}
if (a == 2) {
foo();
}
while (TRUE) {
do_something(work, FALSE);
}
if ((i + 1) == ((j + 2) / 5)) {
return *bar;
}
Generally all enums start from 1, not from 0. 0 is used for not set value.
You can use admin/Gindent to adjust coding style of your file to match our coding style.