Przeglądaj źródła

libdpkg: Rename illegal_triggername to trig_name_is_illegal

Guillem Jover 15 lat temu
rodzic
commit
a6066a13aa
5 zmienionych plików z 7 dodań i 6 usunięć
  1. 1 1
      lib/dpkg/fields.c
  2. 1 1
      lib/dpkg/libdpkg.Versions
  3. 2 2
      lib/dpkg/triglib.c
  4. 1 1
      lib/dpkg/triglib.h
  5. 2 1
      src/trigcmd.c

+ 1 - 1
lib/dpkg/fields.c

@@ -492,7 +492,7 @@ f_trigpend(struct pkginfo *pend, struct pkginfoperfile *pifp,
                   "this context"));
 
   while ((word = scan_word(&value))) {
-    emsg = illegal_triggername(word);
+    emsg = trig_name_is_illegal(word);
     if (emsg)
       parse_error(ps, pend,
                   _("illegal pending trigger name `%.255s': %s"), word, emsg);

+ 1 - 1
lib/dpkg/libdpkg.Versions

@@ -223,7 +223,7 @@ LIBDPKG_PRIVATE {
 	modstatdb_shutdown;
 
 	# Triggers support
-	illegal_triggername;
+	trig_name_is_illegal;
 	trigdef_set_methods;
 	trigdef_update_start;
 	trigdef_update_printf;

+ 2 - 2
lib/dpkg/triglib.c

@@ -40,7 +40,7 @@
 #include <dpkg/triglib.h>
 
 const char *
-illegal_triggername(const char *p)
+trig_name_is_illegal(const char *p)
 {
 	int c;
 
@@ -678,7 +678,7 @@ parse_ci_call(const char *file, const char *cmd, trig_parse_cicb *cb,
 {
 	const char *emsg;
 
-	emsg = illegal_triggername(trig);
+	emsg = trig_name_is_illegal(trig);
 	if (emsg)
 		ohshit(_("triggers ci file `%.250s' contains illegal trigger "
 		         "syntax in trigger name `%.250s': %.250s"),

+ 1 - 1
lib/dpkg/triglib.h

@@ -36,7 +36,7 @@ DPKG_BEGIN_DECLS
  * we're actually doing real package management work.
  */
 
-const char *illegal_triggername(const char *p);
+const char *trig_name_is_illegal(const char *p);
 
 struct trigfileint {
 	struct pkginfo *pkg;

+ 2 - 1
src/trigcmd.c

@@ -215,7 +215,8 @@ main(int argc, const char *const *argv)
 		       bypackage, badname);
 
 	activate = argv[0];
-	if ((badname = illegal_triggername(activate)))
+	badname = trig_name_is_illegal(activate);
+	if (badname)
 		badusage(_("invalid trigger name `%.250s': %.250s"),
 		         activate, badname);