KCompactDisc

wm_helpers.h
1#ifndef WM_HELPERS_H
2#define WM_HELPERS_H
3/*
4 * This file is part of WorkMan, the civilized CD player library
5 * Copyright (C) 1991-1997 by Steven Grimm <koreth@midwinter.com>
6 * Copyright (C) by Dirk Försterling <milliByte@DeathsDoor.com>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 *
22 * Here to be found: Prototypes. Including variable names to be easier
23 * to read.
24 * This is just one more step to a more modular and understandable code.
25 *
26 */
27
28/*
29 * LibWorkMan message levels. I'm not sure how to call them all and which
30 * use they should fulfill. This is not very urgent now, because there
31 * aren't many messages in LibWorkMan now.
32 */
33#define WM_MSG_LEVEL_NONE 0 /**/
34#define WM_MSG_LEVEL_ERROR 1 /**/
35#define WM_MSG_LEVEL_TWO 2
36#define WM_MSG_LEVEL_THREE 3
37#define WM_MSG_LEVEL_FOUR 4
38#define WM_MSG_LEVEL_INFO 5 /**/
39#define WM_MSG_LEVEL_SIX 6
40#define WM_MSG_LEVEL_VERB 7 /**/
41#define WM_MSG_LEVEL_EIGHT 8
42#define WM_MSG_LEVEL_DEBUG 9 /**/
43
44#define WM_MSG_LEVEL_ALL 0xf /**/
45/*
46 * Message classes. This is somehow a definition of
47 * the message's source.
48 */
49
50#define WM_MSG_CLASS_PLATFORM 0x010
51#define WM_MSG_CLASS_SCSI 0x020
52#define WM_MSG_CLASS_CDROM 0x040
53#define WM_MSG_CLASS_DB 0x080
54#define WM_MSG_CLASS_MISC 0x100
55
56#define WM_MSG_CLASS_ALL 0xff0
57
58/*
59 * I did not know any better place...
60 */
61#ifdef DEBUG
62#define CHECKPOINT(t) fprintf(stderr, "%s (%d): %s\n", __FILE__, __LINE__, t );
63#else
64#define CHECKPOINT(t)
65#endif
66
67#ifdef __linux__
68#include <signal.h>
69/* Linux doesn't have a SIGEMT */
70#if !defined( SIGEMT )
71# define SIGEMT SIGUNUSED
72#endif
73#endif /* linux */
74
75void freeup( char **x );
76void wm_strmcat( char **t, const char *s);
77void wm_strmcpy( char **t, const char *s );
78char * wm_strdup( char *s );
79/* Somebody's version query unsatisfied? */
80int wm_libver_major( void ); /* return major internal version number */
81int wm_libver_minor( void ); /* return minor internal version number */
82int wm_libver_pl( void ); /* return internal patchlevel number */
83char * wm_libver_name( void ); /* return internal name (LibWorkMan) */
84char * wm_libver_number( void ); /* returns string: "<major>.<minor>.<pl>" */
85char * wm_libver_string( void ); /* returns string: "<name> <number>" */
86char * wm_libver_date( void ); /* returns string: date of compilation */
87void wm_lib_set_verbosity( int level ); /* set verbosity level */
88int wm_lib_get_verbosity( void ); /* get verbosity level */
89
90void wm_lib_message( unsigned int level, const char *format, ... )
91#ifdef __GNUC__
92 __attribute__ ((format(printf,2,3)))
93#endif
94 ; /* put out a message on stderr */
95int wm_susleep( int usec );
96
97#endif /* WM_HELPERS_H */
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.