move string format utils to sigar_format.[ch]

This commit is contained in:
Doug MacEachern committed 2007-05-19 03:40:12 +00:00
1 parent 6e51d8ac7b
commit f037037b0a
5 files changed
+369 -316

No files matched your search

-11
View File
@@ -190,13 +190,6 @@ typedef struct {
SIGAR_DECLARE(int) sigar_uptime_get(sigar_t *sigar,
sigar_uptime_t *uptime);
SIGAR_DECLARE(int) sigar_uptime_string(sigar_t *sigar,
sigar_uptime_t *uptime,
char *buffer,
int buflen);
SIGAR_DECLARE(char *) sigar_format_size(sigar_uint64_t size, char *buf);
typedef struct {
double loadavg[3];
} sigar_loadavg_t;
@@ -706,10 +699,6 @@ sigar_net_listen_address_get(sigar_t *sigar,
unsigned long port,
sigar_net_address_t *address);
SIGAR_DECLARE(const char *)sigar_net_connection_type_get(int type);
SIGAR_DECLARE(const char *)sigar_net_connection_state_get(int state);
typedef struct {
char user[32];
char device[32];
+34
View File
@@ -0,0 +1,34 @@
/*
* Copyright (C) [2004, 2005, 2006], Hyperic, Inc.
* This file is part of SIGAR.
*
* SIGAR is free software; you can redistribute it and/or modify
* it under the terms version 2 of the GNU General Public License as
* published by the Free Software Foundation. This program is distributed
* in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*/
#ifndef SIGAR_FORMAT_H
#define SIGAR_FORMAT_H
SIGAR_DECLARE(int) sigar_uptime_string(sigar_t *sigar,
sigar_uptime_t *uptime,
char *buffer,
int buflen);
SIGAR_DECLARE(char *) sigar_format_size(sigar_uint64_t size, char *buf);
SIGAR_DECLARE(const char *)sigar_net_connection_type_get(int type);
SIGAR_DECLARE(const char *)sigar_net_connection_state_get(int state);
#endif