X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Ftemphelper.c;h=c577a1c2e74d6d9d79a018e863d6bd67d5077dc9;hb=7a8c1e45c8d53a3b84a712c09c1fbdf9eaaa3e5a;hp=a90059b34ea52db9e5dabbd2784bcb05b205c13c;hpb=2fa5f97edbc2c77833bdef3ba0ac5663d5eb25d6;p=monky diff --git a/src/temphelper.c b/src/temphelper.c index a90059b..c577a1c 100644 --- a/src/temphelper.c +++ b/src/temphelper.c @@ -1,4 +1,7 @@ -/* temphelper.c: aid in converting temperature units +/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- + * vim: ts=4 sw=4 noet ai cindent syntax=c + * + * temphelper.c: aid in converting temperature units * * Copyright (C) 2008 Phil Sutter * @@ -30,20 +33,17 @@ /* default to output in celsius */ static enum TEMP_UNIT output_unit = TEMP_CELSIUS; -static double -fahrenheit_to_celsius(double n) +static double fahrenheit_to_celsius(double n) { return ((n - 32) * 5 / 9); } -static double -celsius_to_fahrenheit(double n) +static double celsius_to_fahrenheit(double n) { return ((n * 9 / 5) + 32); } -int -set_temp_output_unit(const char *name) +int set_temp_output_unit(const char *name) { long i; int rc = 0; @@ -66,8 +66,7 @@ set_temp_output_unit(const char *name) return rc; } -static double -convert_temp_output(double n, enum TEMP_UNIT input_unit) +static double convert_temp_output(double n, enum TEMP_UNIT input_unit) { if (input_unit == output_unit) return n;