po: Update German man pages translation
[dpkg.git] / lib / dpkg / trigname.c
blobd2711405158dfb0a77c28c44a0b70eb62d972bc2
1 /*
2 * libdpkg - Debian packaging suite library routines
3 * trigname.c - trigger name handling
5 * Copyright © 2007 Canonical Ltd
6 * Written by Ian Jackson <ijackson@chiark.greenend.org.uk>
8 * This is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 #include <config.h>
23 #include <compat.h>
25 #include <dpkg/i18n.h>
26 #include <dpkg/triglib.h>
28 const char *
29 trig_name_is_illegal(const char *p)
31 int c;
33 if (!*p)
34 return _("empty trigger names are not permitted");
36 while ((c = *p++)) {
37 if (c <= ' ' || c >= 0177)
38 return _("trigger name contains invalid character");
41 return NULL;