mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-03 13:38:25 +00:00
Get rid of spacestr().
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2253 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
8a64c5fd31
commit
8408e0604a
1 file changed
+2
-13
+2
-13
@@ -27,7 +27,6 @@
|
||||
#include "lib/chips.h"
|
||||
#include "kernel/include/sensors.h"
|
||||
|
||||
static char *spacestr(int n);
|
||||
static void print_label(const char *label, int space);
|
||||
static void free_the_label(char **label);
|
||||
static void print_temp_info(float, float, float, int, int, int);
|
||||
@@ -36,16 +35,6 @@ static inline float deg_ctof( float );
|
||||
extern int fahrenheit;
|
||||
extern char degstr[5];
|
||||
|
||||
char *spacestr(int n)
|
||||
{
|
||||
static char buf[80];
|
||||
int i;
|
||||
for (i = 0; i < n; i++)
|
||||
buf[i]=' ';
|
||||
buf[n] = '\0';
|
||||
return buf;
|
||||
}
|
||||
|
||||
inline float deg_ctof( float cel )
|
||||
{
|
||||
return ( cel * ( 9.0F / 5.0F ) + 32.0F );
|
||||
@@ -104,9 +93,9 @@ void print_label(const char *label, int space)
|
||||
{
|
||||
int len=strlen(label)+1;
|
||||
if (len > space)
|
||||
printf("%s:\n%s",label,spacestr(space));
|
||||
printf("%s:\n%*s", label, space, "");
|
||||
else
|
||||
printf("%s:%s",label,spacestr(space - len));
|
||||
printf("%s:%*s", label, space - len, "");
|
||||
}
|
||||
|
||||
void free_the_label(char **label)
|
||||
|
||||
Reference in new issue
Block a user