wmmoonclock: Bump to version 1.29.
[dockapps.git] / ascd / libworkman / include / wm_helpers.h
blob60d0e92c1d8c7871cfbf213c6db1806bd7985aba
1 #ifndef WM_HELPERS_H
2 #define WM_HELPERS_H
3 /*
4 * $Id: wm_helpers.h,v 1.6 1999/03/07 08:36:44 dirk Exp $
6 * This file is part of WorkMan, the civilized CD player library
7 * (c) 1991-1997 by Steven Grimm (original author)
8 * (c) by Dirk Försterling (current 'author' = maintainer)
9 * The maintainer can be contacted by his e-mail address:
10 * milliByte@DeathsDoor.com
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this library; if not, write to the Free
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 * Here to be found: Prototypes. Including variable names to be easier
27 * to read.
28 * This is just one more step to a more modular and understandable code.
33 * LibWorkMan message levels. I'm not sure how to call them all and which
34 * use they should fulfill. This is not very urgent now, because there
35 * aren't many messages in LibWorkMan now.
37 #define WM_MSG_LEVEL_NONE 0
38 #define WM_MSG_LEVEL_ERROR 1
39 #define WM_MSG_LEVEL_TWO 2
40 #define WM_MSG_LEVEL_THREE 3
41 #define WM_MSG_LEVEL_FOUR 4
42 #define WM_MSG_LEVEL_INFO 5
43 #define WM_MSG_LEVEL_SIX 6
44 #define WM_MSG_LEVEL_SEVEN 7
45 #define WM_MSG_LEVEL_EIGHT 8
46 #define WM_MSG_LEVEL_DEBUG 9
49 * Message classes. This is somehow a definition of
50 * the message's source.
53 #define WM_MSG_CLASS_PLATFORM 0x010
54 #define WM_MSG_CLASS_SCSI 0x020
55 #define WM_MSG_CLASS_CDROM 0x040
56 #define WM_MSG_CLASS_DB 0x080
57 #define WM_MSG_CLASS_MISC 0x100
59 #define WM_MSG_CLASS_ALL 0xff0
61 extern int wm_lib_verbosity;
64 * I did not know any better place...
66 #ifdef DEBUG
67 #define CHECKPOINT(t) fprintf(stderr, "%s (%d): %s\n", __FILE__, __LINE__, t );
68 #else
69 #define CHECKPOINT(t)
70 #endif
72 #ifndef TRUE
73 #define TRUE 1
74 #endif
76 #ifndef FALSE
77 #define FALSE 0
78 #endif
80 #ifdef linux
81 #include <signal.h>
82 /* Linux doesn't have a SIGEMT */
83 #if !defined( SIGEMT )
84 # define SIGEMT SIGUNUSED
85 #endif
86 #endif /* linux */
88 void freeup( char **x );
89 void wm_strmcat( char **t, char *s);
90 void wm_strmcpy( char **t, char *s );
91 char * wm_strdup( char *s );
92 /* Somebody's version query unsatisfied? */
93 int wm_libver_major( void ); /* return major internal version number */
94 int wm_libver_minor( void ); /* return minor internal version number */
95 int wm_libver_pl( void ); /* return internal patchlevel number */
96 char * wm_libver_name( void ); /* return internal name (LibWorkMan) */
97 char * wm_libver_number( void ); /* returns string: "<major>.<minor>.<pl>" */
98 char * wm_libver_string( void ); /* returns string: "<name> <number>" */
99 char * wm_libver_date( void ); /* returns string: date of compilation */
100 void wm_lib_set_verbosity( int level ); /* set verbosity level */
101 int wm_lib_get_verbosity( void ); /* get verbosity level */
102 void wm_lib_message( unsigned int level, char *format, ... ); /* put out a message on stderr */
103 int wm_susleep( int usec );
105 #endif /* WM_HELPERS_H */