Sat, 09 Oct 2004 17:42:46 +0200
trunk: changeset 1814
restore.
| 0 | 1 | /* |
| 2 | * libtu/util.c | |
| 3 | * | |
| 36 | 4 | * Copyright (c) Tuomo Valkonen 1999-2002. |
| 53 | 5 | * |
| 6 | * You may distribute and modify this library under the terms of either | |
| 7 | * the Clarified Artistic License or the GNU LGPL, version 2.1 or later. | |
| 0 | 8 | */ |
| 9 | ||
| 10 | #include <stdarg.h> | |
| 11 | #include <stdio.h> | |
| 12 | #include <stdlib.h> | |
| 13 | #include <string.h> | |
| 14 | ||
| 15 | #ifdef CONFIG_LOCALE | |
| 16 | #include <libintl.h> | |
| 17 | #endif | |
| 18 | ||
| 70 | 19 | #include "util.h" |
| 20 | #include "misc.h" | |
| 0 | 21 | |
| 22 | ||
| 23 | static const char *progname=NULL; | |
| 24 | ||
| 25 | ||
| 12 | 26 | void libtu_init(const char *argv0) |
| 0 | 27 | { |
| 62 | 28 | progname=argv0; |
| 29 | ||
| 0 | 30 | #ifdef CONFIG_LOCALE |
| 62 | 31 | textdomain(simple_basename(argv0)); |
| 0 | 32 | #endif |
| 33 | } | |
| 34 | ||
| 35 | ||
| 36 | const char *prog_execname() | |
| 37 | { | |
| 62 | 38 | return progname; |
| 0 | 39 | } |
| 40 |