Просмотр исходного кода

libdpkg: Rename cu_closefile to cu_closestream

This should make it clear we are referring to a stdio stream, and not
the future planned ‘struct file’.
Guillem Jover лет назад: 15
Родитель
Сommit
7337447704
5 измененных файлов с 8 добавлено и 8 удалено
  1. 1 1
      lib/dpkg/cleanup.c
  2. 1 1
      lib/dpkg/dpkg.h
  3. 4 4
      lib/dpkg/triglib.c
  4. 1 1
      src/filesdb.c
  5. 1 1
      src/processarc.c

+ 1 - 1
lib/dpkg/cleanup.c

@@ -37,7 +37,7 @@ cu_closepipe(int argc, void **argv)
 }
 
 void
-cu_closefile(int argc, void **argv)
+cu_closestream(int argc, void **argv)
 {
 	FILE *f = (FILE *)(argv[0]);
 

+ 1 - 1
lib/dpkg/dpkg.h

@@ -119,7 +119,7 @@ void statusfd_send(const char *fmt, ...) DPKG_ATTR_PRINTF(1);
 
 /*** cleanup.c ***/
 
-void cu_closefile(int argc, void **argv);
+void cu_closestream(int argc, void **argv);
 void cu_closepipe(int argc, void **argv);
 void cu_closedir(int argc, void **argv);
 void cu_closefd(int argc, void **argv);

+ 4 - 4
lib/dpkg/triglib.c

@@ -418,7 +418,7 @@ trk_explicit_interest_change(const char *trig,  struct pkginfo *pkg, int signum)
 	if (!nf)
 		ohshite(_("unable to create new trigger interest file `%.250s'"),
 		        newfn.buf);
-	push_cleanup(cu_closefile, ~ehflag_normaltidy, NULL, 0, 1, nf);
+	push_cleanup(cu_closestream, ~ehflag_normaltidy, NULL, 0, 1, nf);
 
 	while (trk_explicit_f && trk_explicit_fgets(buf, sizeof(buf)) >= 0) {
 		if (!strcmp(buf, pkg->name))
@@ -533,7 +533,7 @@ trig_file_interests_save(void)
 	if (!nf)
 		ohshite(_("unable to create new file triggers file `%.250s'"),
 		        triggersnewfilefile);
-	push_cleanup(cu_closefile, ~ehflag_normaltidy, NULL, 0, 1, nf);
+	push_cleanup(cu_closestream, ~ehflag_normaltidy, NULL, 0, 1, nf);
 
 	for (tfi = filetriggers.head; tfi; tfi = tfi->inoverall.next)
 		fprintf(nf, "%s %s\n", trigh.namenode_name(tfi->fnn),
@@ -581,7 +581,7 @@ trig_file_interests_ensure(void)
 		        triggersfilefile);
 	}
 
-	push_cleanup(cu_closefile, ~0, NULL, 0, 1, f);
+	push_cleanup(cu_closestream, ~0, NULL, 0, 1, f);
 	while (fgets_checked(linebuf, sizeof(linebuf), f, triggersfilefile) >= 0) {
 		space = strchr(linebuf, ' ');
 		if (!space || linebuf[0] != '/')
@@ -711,7 +711,7 @@ trig_parse_ci(const char *file, trig_parse_cicb *interest,
 			return; /* No file is just like an empty one. */
 		ohshite(_("unable to open triggers ci file `%.250s'"), file);
 	}
-	push_cleanup(cu_closefile, ~0, NULL, 0, 1, f);
+	push_cleanup(cu_closestream, ~0, NULL, 0, 1, f);
 
 	while ((l = fgets_checked(linebuf, sizeof(linebuf), f, file)) >= 0) {
 		for (cmd = linebuf; cisspace(*cmd); cmd++);

+ 1 - 1
src/filesdb.c

@@ -513,7 +513,7 @@ write_filelist_except(struct pkginfo *pkg, struct fileinlist *list,
   file= fopen(newvb.buf,"w+");
   if (!file)
     ohshite(_("unable to create updated files list file for package %s"),pkg->name);
-  push_cleanup(cu_closefile, ehflag_bombout, NULL, 0, 1, (void *)file);
+  push_cleanup(cu_closestream, ehflag_bombout, NULL, 0, 1, (void *)file);
   while (list) {
     if (!(leaveout && (list->namenode->flags & fnnf_elide_other_lists))) {
       fputs(list->namenode->name,file);

+ 1 - 1
src/processarc.c

@@ -560,7 +560,7 @@ void process_archive(const char *filename) {
   strcpy(cidirrest,CONFFILESFILE);
   conff= fopen(cidir,"r");
   if (conff) {
-    push_cleanup(cu_closefile, ehflag_bombout, NULL, 0, 1, (void *)conff);
+    push_cleanup(cu_closestream, ehflag_bombout, NULL, 0, 1, (void *)conff);
     while (fgets(conffilenamebuf,MAXCONFFILENAME-2,conff)) {
       struct filepackages_iterator *iter;