File: utils.h

package info (click to toggle)
ptop 3.6.2-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,516 kB
  • sloc: ansic: 18,233; sh: 3,493; makefile: 124; awk: 44
file content (41 lines) | stat: -rw-r--r-- 992 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
30
31
32
33
34
35
36
37
38
39
40
41
/*
 *	Top users/processes display for Unix
 *	Version 3
 *
 *	This program may be freely redistributed,
 *	but this entire comment MUST remain intact.
 *
 *	Copyright (c) 1984, 1989, William LeFebvre, Rice University
 *	Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
 */

#ifndef _UTILS_H_
#define _UTILS_H_

/* prototypes for functions found in utils.c */

int			atoiwi(char *);
char	   *itoa(int);
char	   *itoa7(uid_t);
int			digits(int);
char	   *printable(char *);
char	   *strecpy(char *, char *);
char	   *homogenize(char *);
int			string_index(char *, char **);
char	  **argparse(char *, int *);
long		percentages(int, int64_t *, int64_t *, int64_t *, int64_t *);
char	   *errmsg(int);
char	   *format_percent(double);
char	   *format_time(long);
char	   *format_k(long);
char	   *string_list(char **);
void		debug_set(int);

#ifdef DEBUG
#define dprintf xdprintf
void		xdprintf(char *fmt,...);
#else
#define dprintf if (0)
#endif

#endif   /* _UTILS_H_ */