File: common.h

package info (click to toggle)
potool 0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 248 kB
  • sloc: ansic: 718; yacc: 452; sh: 290; perl: 51; makefile: 49
file content (25 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * potool is a program aiding editing of po files
 * Copyright (C) 1999-2002 Zbigniew Chyla
 *
 * see LICENSE for licensing info
 */
#ifndef COMMON_H
#define COMMON_H

#include <glib.h>

#define g_slist_free_custom(list,free_func) \
G_STMT_START { \
	GSList *potool_list = (list), *potool_l; \
	for (potool_l = potool_list; potool_l != NULL; potool_l = potool_l->next) \
		free_func (potool_l->data); \
	g_slist_free (potool_list); \
} G_STMT_END

/* Critical error that causes the program to exit 1.
 * This is unlike g_error which calls abort() which dumps core.
 */
void po_error(const gchar *format, ...);

#endif /* COMMON_H */