File: util.h

package info (click to toggle)
cdtool 2.1.8-release-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 772 kB
  • sloc: ansic: 4,886; sh: 2,823; makefile: 143
file content (52 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (5)
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
42
43
44
45
46
47
48
49
50
51
52
#ifndef _UTIL_H
#define _UTIL_H

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include "config.h"
#include "cdtool.h"

/* version string printed with usage message */ 
#define VERSION_STRING "CDTOOL " PACKAGE_VERSION \
  " (c) 1994-2004 Thomas Insel, et al.  Licensed under GPL."

/* general definitions */
#ifndef TRUE
  #define TRUE (1==1)
#endif

#ifndef FALSE
  #define FALSE (1==0)
#endif

#define DOCRLF 2
#define DOLF   1
#define DONADA 0

#define BUGFOUND(x) bugfound(x, __FILE__, __FUNCTION__, __LINE__);
 
extern int cdtool_show_crlf;
extern int cdtool_show_verbose;
extern int cdtool_show_debug;

#ifndef HAVE_STRSEP
char *strsep(char **stringp, const char *delim);
#endif

void debugmsg(char *fmt, ...);
void errormsg(char *fmt, ...);
void verbosemsg(char *fmt, ...);
void infomsg(char *fmt, ...);
void bugfound(char *message, char *file, char *function, int line);
void show_permissions(char *device);
void do_crlf(FILE *term);

char *device_detect(char *choice);
int is_device(char *path, int verbose);
int checkmount(char *pszName);

char *getprogname(void);
char *setprogname(char *name);

#endif