File: misc.h

package info (click to toggle)
abook 0.5.3-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,084 kB
  • ctags: 759
  • sloc: ansic: 6,613; sh: 3,272; cpp: 956; python: 256; perl: 91; makefile: 89
file content (36 lines) | stat: -rw-r--r-- 720 bytes parent folder | download
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
#ifndef _MISC_H
#define _MISC_H

char		*revstr(char *str);
char		*strupper(char *str);
char		*strlower(char *str);
char		*strtrim(char *);

char		*mkstr (const char *format, ... );
char		*strconcat (const char *str, ...);

int		safe_strcmp(const char *s1, const char *s2);
int		safe_strcoll(const char *s1, const char *s2);

char		*my_getcwd();

char		*getaline(FILE *f);

int		strwidth(const char *s);
int		bytes2width(const char *s, int width);


#ifdef HAVE_CONFIG_H
#	include "config.h"
#endif

#include <stdarg.h>

#ifndef HAVE_SNPRINTF
int snprintf (char *str, size_t count, const char *fmt, ...);
#endif
#ifndef HAVE_VSNPRINTF
int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
#endif

#endif