File: util.h

package info (click to toggle)
multipath-tools 0.4.7-1.1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 1,196 kB
  • ctags: 2,144
  • sloc: ansic: 18,261; makefile: 398; sh: 270
file content (16 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef _UTIL_H
#define _UTIL_H

int strcmp_chomp(char *, char *);
void strchop(char *);
void basename (char * src, char * dst);
int filepresent (char * run);
int get_word (char * sentence, char ** word);


#define safe_sprintf(var, format, args...)	\
	snprintf(var, sizeof(var), format, ##args) >= sizeof(var)
#define safe_snprintf(var, size, format, args...)      \
	snprintf(var, size, format, ##args) >= size

#endif /* _UTIL_H */