delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/11/24/04:54:31

Date: Fri, 24 Nov 2000 11:54:47 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt>
Message-Id: <2593-Fri24Nov2000115446+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp-workers AT delorie DOT com
In-reply-to: <71D4EB076F@HRZ1.hrz.tu-darmstadt.de>
(ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De)
Subject: Re: Patch #2 for dtou.c
References: <71D4EB076F AT HRZ1 DOT hrz DOT tu-darmstadt DOT de>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
> Date: Fri, 24 Nov 2000 09:05:14 +0200
>
> After evaluating all the comments, I have done the following
> modifications to the old patch.

Thanks again for working on this.

I have no objections and/or comments about the options and their
effect.

> !       if (!r_mode)
> !         if (buf[i] == CntlZ) { SET_FLAG (CntlZ_flag); break; }
> !       if (s_mode)

Is it possible to replace r_mode, s_mode, etc. with a little more
mnemonic names?

> !     if (b_mode && (CR_flag || nCR_flag || CntlZ_flag || LF_flag))
> !       rename (fname, bfname);
> !     else
> !       remove (fname);
> !     rename (tfname, fname);
> !     chown (fname, st.st_uid, st.st_gid);
> !     chmod (fname, st.st_mode);
> !     if (!t_mode)
> !       utime (fname, &tim1);

Under t_mode, won't this change the time stamp of a file even if it
wasn't modified?  I think to preserve time stamps of unmodified files,
you need either to remove the rewritten (identical) file "dtou.tm$"
and leave the original file alone, or call `utime' on unmodified
files, even though t_mode is in effect.

Am I missing something?

> + Creates a backup of the original file if the file has been modified.
> + @code{.d2u} is used as backup suffix.

File names and their parts should have the @file markup, so please
change this to @file{.d2u}.

> + as @code{.gz}, @code{.bz2}, @code{.tgz} as text files.

Same here.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019