03944874e5a6db187555add067e06604e6472a04
[reactos.git] / reactos / tools / wmc / utils.h
1 /*
2 * Utility routines' prototypes etc.
3 *
4 * Copyright 1998,2000 Bertho A. Stultiens (BS)
5 *
6 */
7
8 #ifndef __WMC_UTILS_H
9 #define __WMC_UTILS_H
10
11 #ifndef __WMC_WMCTYPES_H
12 #include "wmctypes.h"
13 #endif
14
15 #include <stddef.h> /* size_t */
16
17 void *xmalloc(size_t);
18 void *xrealloc(void *, size_t);
19 char *xstrdup(const char *str);
20
21 #if 0
22 int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
23 int xyyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
24 int yywarning(const char *s, ...) __attribute__((format (printf, 1, 2)));
25 void internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4)));
26 void error(const char *s, ...) __attribute__((format (printf, 1, 2)));
27 void warning(const char *s, ...) __attribute__((format (printf, 1, 2)));
28 #endif
29 int yyerror(const char *s, ...);
30 int xyyerror(const char *s, ...);
31 int yywarning(const char *s, ...);
32 void internal_error(const char *file, int line, const char *s, ...);
33 void error(const char *s, ...);
34 void warning(const char *s, ...);
35
36 char *dup_basename(const char *name, const char *ext);
37
38 WCHAR *xunistrdup(const WCHAR * str);
39 WCHAR *unistrcpy(WCHAR *dst, const WCHAR *src);
40 int unistrlen(const WCHAR *s);
41 int unistricmp(const WCHAR *s1, const WCHAR *s2);
42 int unistrcmp(const WCHAR *s1, const WCHAR *s2);
43
44 #endif