source: trunk/tools/wrc/utils.h@ 5523

Last change on this file since 5523 was 5523, checked in by sandervl, 24 years ago

updates

File size: 1.2 KB
Line 
1/*
2 * Utility routines' prototypes etc.
3 *
4 * Copyright 1998 Bertho A. Stultiens (BS)
5 *
6 */
7
8#ifndef __WRC_UTILS_H
9#define __WRC_UTILS_H
10
11#ifndef __WRC_WRCTYPES_H
12#include "wrctypes.h"
13#endif
14
15#include <stddef.h> /* size_t */
16
17void *xmalloc(size_t);
18void *xrealloc(void *, size_t);
19char *xstrdup(const char *str);
20
21int pperror(const char *s, ...) __attribute__((format (printf, 1, 2)));
22int ppwarning(const char *s, ...) __attribute__((format (printf, 1, 2)));
23int yyerror(const char *s, ...) __attribute__((format (printf, 1, 2)));
24int yywarning(const char *s, ...) __attribute__((format (printf, 1, 2)));
25void internal_error(const char *file, int line, const char *s, ...) __attribute__((format (printf, 3, 4)));
26void error(const char *s, ...) __attribute__((format (printf, 1, 2)));
27void warning(const char *s, ...) __attribute__((format (printf, 1, 2)));
28void chat(const char *s, ...) __attribute__((format (printf, 1, 2)));
29
30char *dup_basename(const char *name, const char *ext);
31char *dupwstr2cstr(const short *str);
32short *dupcstr2wstr(const char *str);
33int compare_name_id(name_id_t *n1, name_id_t *n2);
34string_t *convert_string(const string_t *str, enum str_e type);
35void set_language(unsigned short lang, unsigned short sublang);
36
37#endif
Note: See TracBrowser for help on using the repository browser.