2 * Utility routines' prototypes etc.
4 * Copyright 1998 Bertho A. Stultiens (BS)
11 #ifndef __WRC_WRCTYPES_H
15 #include <stddef.h> /* size_t */
17 void *xmalloc(size_t);
18 void *xrealloc(void *, size_t);
19 char *xstrdup(const char *str
);
21 int pperror(const char *s
, ...) __attribute__((format (printf
, 1, 2)));
22 int ppwarning(const char *s
, ...) __attribute__((format (printf
, 1, 2)));
23 int yyerror(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 void chat(const char *s
, ...) __attribute__((format (printf
, 1, 2)));
30 char *dup_basename(const char *name
, const char *ext
);
31 char *dupwstr2cstr(const short *str
);
32 short *dupcstr2wstr(const char *str
);
33 int compare_name_id(name_id_t
*n1
, name_id_t
*n2
);
34 string_t
*convert_string(const string_t
*str
, enum str_e type
);
35 void set_language(unsigned short lang
, unsigned short sublang
);