bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM


From: Jim Meyering
Subject: Re: [PATCHv2 0/7] Re: temp file suffixes: mktemp DWIM
Date: Thu, 05 Nov 2009 10:35:40 +0100

Eric Blake wrote:
> According to Eric Blake on 11/4/2009 5:13 PM:
>> I'll post a link once I've actually pushed these to my personal repository on
>> repo.or.cz, to make reviewing a bit easier (especially given the long lines).
>
> http://repo.or.cz/w/coreutils/ericb.git
> git pull git://repo.or.cz/coreutils/ericb.git master

Nice work!
Modulo tiny comments, you're welcome to push that series
once you've pushed the gnulib bits upon which it depends.

As you know, with this patch and using latest gnulib, currently
bootstrap fails.  If you leave an hour or two between the gnulib
and coreutils pushes, give me a heads up and I'll test the
coreutils changes.  But given the thorough coverage, and considering
the relative portability, I'd be surprised to find a problem.

----------------------

There are two spacing nits in the src/mktemp.c change
in "build: reflect gnulib changes to tempname":

 mkstemp_len (char *tmpl, size_t suff_len, bool dry_run)
 {
-  return gen_tempname_len (tmpl, 0, dry_run ? GT_NOCREATE : GT_FILE, suff_len);
+   return gen_tempname_len (tmpl, 0, 0, dry_run ? GT_NOCREATE : GT_FILE,
+                            suff_len);

 mkdtemp_len (char *tmpl, size_t suff_len, bool dry_run)
 {
-  return gen_tempname_len (tmpl, 0, dry_run ? GT_NOCREATE : GT_DIR, suff_len);
+   return gen_tempname_len (tmpl, 0, 0, dry_run ? GT_NOCREATE : GT_DIR,
+                            suff_len);

Those "return..." lines should be indented by only 2 spaces, not 3.

-----------------------------------------------
The --help text reads better if it says "`X's", e.g.,

  -TEMPLATE must end in at least 3 consecutive X.\n\
  +TEMPLATE must end in at least 3 consecutive `X's.\n\

and in texinfo (though there may be more):

  +implied.  The final run of @samp{X} in the @var{template} will be replaced
  -implied.  The final run of @samp{X}s in the @var{template} will be replaced

-------------------------------
BTW, I didn't cheat ;-), spotted the bug in your first patch,
and see that you fixed it in the latest:

  -      if (template[len - 1] != 'X')
  +      if (!len || template[len - 1] != 'X')




reply via email to

[Prev in Thread] Current Thread [Next in Thread]