File: util.h

package info (click to toggle)
lcdproc 0.5.9-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,064 kB
  • sloc: ansic: 59,645; sh: 1,740; perl: 681; makefile: 417
file content (29 lines) | stat: -rw-r--r-- 747 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/** \file clients/lcdproc/util.h
 * Header file for \c util.c
 */

/*-
 * Copyright (C) 2005  Peter Marschall
 *
 * This file is part of lcdproc, the lcdproc client.
 *
 * This file is released under the GNU General Public License.
 * Refer to the COPYING file distributed with this package.
 */

#ifndef LCDPROC_UTIL_H
#define LCDPROC_UTIL_H

#include <stdio.h>
#include <string.h>

/** print a memory value with the correct unit to a given string */
char *sprintf_memory(char *dst, double value, double roundlimit);

/** print a percentage value to a given string */
char *sprintf_percent(char *dst, double percent);

/** converts value into power-of-x representation */
char *convert_double(double *value, int base, double roundlimit);

#endif