RE: help/version patches

2002-02-24 Thread Robert Collins



> -Original Message-
> From: Joshua Daniel Franklin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 4:22 PM
> To: [EMAIL PROTECTED]
> Subject: help/version patches
> 
> 
> I've got patches for each of the utils to add/correct the help and
> version output options. There are 13 in all. I incremented the
> version number 0.01 from the ones in CVS/Entries with the
> exception of cygpath. I also added a line based on one found in
> strace that imbeds the compile date into the version output:

Some confusion here: I was meaning that having something like:
const char *revision="$Revision: $ ";
in the file allows you to then use:
const char *version = revision[11];
to obtain the correct version number.

Rob



Re: help/version patches

2002-02-24 Thread Christopher Faylor

On Sun, Feb 24, 2002 at 09:21:43PM -0800, Joshua Daniel Franklin wrote:
>I've got patches for each of the utils to add/correct the help and
>version output options. There are 13 in all. I incremented the
>version number 0.01 from the ones in CVS/Entries with the
>exception of cygpath. I also added a line based on one found in
>strace that imbeds the compile date into the version output:
>
>case 'v':
>  printf ("cygpath (cygwin) 1.21\n");
>  printf ("Path Conversion Utility\n");
>  printf ("Copyright 1998-2002 Red Hat, Inc.\n");
>  fputs("Compiled "__DATE__"\n", stdout);
>  exit (0);
>
>Please someone let me know if this is a Bad Idea for some reason.
>I would also very much like to know the best way to submit these.
>Thanks.

Adding version numbers is not a bad idea (although, I can't honestly
think of a time when it would have helped to have this information).
Adding version numbers in the middle of the program, in the middle of a
text string is, IMO, a bad idea.  The version number should be at
the top of the program in a

const char version[] = "something";

and referenced in the version string.

As Robert indicated, using the CVS version number is probably the best
way to handle this.  setup.exe currently uses the CVS version.  Use that
as an example.

cgf

cgf



help/version patches

2002-02-24 Thread Joshua Daniel Franklin

I've got patches for each of the utils to add/correct the help and
version output options. There are 13 in all. I incremented the
version number 0.01 from the ones in CVS/Entries with the
exception of cygpath. I also added a line based on one found in
strace that imbeds the compile date into the version output:

case 'v':
  printf ("cygpath (cygwin) 1.21\n");
  printf ("Path Conversion Utility\n");
  printf ("Copyright 1998-2002 Red Hat, Inc.\n");
  fputs("Compiled "__DATE__"\n", stdout);
  exit (0);

Please someone let me know if this is a Bad Idea for some reason.
I would also very much like to know the best way to submit these.
Thanks.

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com



Re: [Patch]setup.exe type prefixes for io_stream::mkpath_p and io_stream:open paths

2002-02-24 Thread Robert Collins


===
- Original Message - 
From: "Michael A Chase" <[EMAIL PROTECTED]>



> If you are going to use "cygfile://" then you shouldn't be calling
> cygpath().

Whacks self on head. Thanks.

Rob




Re: [Patch]setup.exe type prefixes for io_stream::mkpath_p and io_stream:open paths

2002-02-24 Thread Michael A Chase

- Original Message -
From: "Robert Collins" <[EMAIL PROTECTED]>
To: "Michael A Chase" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, February 24, 2002 17:20
Subject: Re: [Patch]setup.exe type prefixes for io_stream::mkpath_p and
io_stream:open paths


> Thanks Michael - I've applied a slight variation (cygfile:// is the
> appropriate prefix for the io_stream_cygfile links) to the setup200202
> branch. For HEAD we should actually start using io_streams in desktop.cc
> which will remove the need for cygpath usage. Rather than renaming
> cygpath (which is consistent with cygwin's innards, and the cygpath
> commandline util) I'd like to finish getting everything to use
> io_stream's cygfile:// syntax.

If you are going to use "cygfile://" then you shouldn't be calling
cygpath().
===
RCS file: /cvs/src/src/winsup/cinstall/io_stream_cygfile.cc,v
retrieving revision 2.9
retrieving revision 2.9.2.1
diff -u -r2.9 -r2.9.2.1
--- src/winsup/cinstall/io_stream_cygfile.cc2002/02/18 13:53:06 2.9
+++ src/winsup/cinstall/io_stream_cygfile.cc2002/02/25 01:16:58 2.9.2.1
@@ -128,16 +128,16 @@
/* textmode alert: should we translate when linking from an binmode to a
   text mode mount and vice verca?
 */
-   io_stream *in = io_stream::open (cygpath (to), "rb");
+   io_stream *in = io_stream::open (String ("cygfile://") + cygpath (to),
"rb");
if (!in)
  {
log (LOG_TIMESTAMP, String("could not open ") + to +" for reading in
mklink");
return 1;
  }
-   io_stream *out = io_stream::open (cygpath (from), "wb");
+   io_stream *out = io_stream::open (String ("cygfile://") + cygpath (from),
"wb");
if (!out)
  {
-- Mac :})** I normally forward private questions to the appropriate mail
list. **Ask Smarter:
http://www.tuxedo.org/~esr/faqs/smart-questions.htmlGive a hobbit a fish and
he eats fish for a day.Give a hobbit a ring and he eats fish for an age.





Re: [Patch]setup.exe type prefixes for io_stream::mkpath_p and io_stream:open paths

2002-02-24 Thread Robert Collins

Thanks Michael - I've applied a slight variation (cygfile:// is the
appropriate prefix for the io_stream_cygfile links) to the setup200202
branch. For HEAD we should actually start using io_streams in desktop.cc
which will remove the need for cygpath usage. Rather than renaming
cygpath (which is consistent with cygwin's innards, and the cygpath
commandline util) I'd like to finish getting everything to use
io_stream's cygfile:// syntax.

Rob




[Patch]setup.exe type prefixes for io_stream::mkpath_p and io_stream:open paths

2002-02-24 Thread Michael A Chase

- Original Message -
From: "Robert Collins" <[EMAIL PROTECTED]>
To: "Michael A Chase" <[EMAIL PROTECTED]>; "Jan Nieuwenhuizen"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, February 24, 2002 02:44
Subject: Re: setup.exe /var, /tmp?


> - Original Message -
> From: "Michael A Chase" <[EMAIL PROTECTED]>
>
> > These are probably not the only places where the prefixes may be
> missing.
> > Would it be worthwhile to add a log() call if no "file://" or
> "cygfile://"
> > prefix is found in io_stream::mkpath_p()?
>
> Possibly in your sandbox. I don't feel the need in CVS though :}.
>
> > I'm doing a search for all the mkpath_p() calls I can find, but often
> the
> > file or directory name is passed from somewhere else.
>
> Thank you.

I also looked through the calls to io_stream*::open() and found a couple
places that appeared to be missing the required prefix in
io_stream_cygfile.cc.

Robert,

To avoid confusion, perhaps cygpath() should be renamed native_path() or
natpath().  I could make that change fairly easily if you want.

--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

ChangeLog:

2002-02-24  Michael A Chase <[EMAIL PROTECTED]>

* desktop.cc (make_link): Add "file://" prefix to io_stream::mkpath_p()
call.
(make_passwd_group): Ditto.
* localdir.cc (save_local_dir): Ditto.
* io_stream_cygfile.cc (io_stream_cygfile::mklink): Wrap long lines.
Add "file://" prefix to io_stream::open() calls.




cinstall-mac-020224-1.patch
Description: Binary data


Re: version information for cygcheck

2002-02-24 Thread Joshua Daniel Franklin

>The usual thing to do for versions is to get the CVS version number and
>apply that.

I'm assuming that lines like this in CVS/Entries give the version numbers:

/cygcheck.cc/1.22/Tue Jan 29 03:08:42 2002/-ko/
/cygpath.cc/1.13/Thu Jan 17 16:54:01 2002/-ko/
/dump_setup.cc/1.4/Tue Jan 29 18:37:00 2002//
/dumper.cc/1.8/Fri Sep 14 15:07:31 2001//
/dumper.h/1.2/Thu Aug 30 16:47:51 2001//
/getfacl.c/1.5/Tue Jan 29 03:08:42 2002/-ko/
/kill.cc/1.10/Mon Oct  8 03:06:25 2001/-ko/
/mkgroup.c/1.9/Tue Jan 29 03:08:42 2002/-ko/
/mkpasswd.c/1.20/Thu Jan 31 12:43:29 2002/-ko/
...

I've got a problem then. Currently `cygpath --version` outputs 1.2, where it
should be 1.13 apparently. Is there a way to get the CVS version up to 1.21
with a patch? Also, if I add --version options to each util,
should I increment the version by .01 each time, so cygcheck will be v1.23,
mkgroup 1.91, etc.? I guess the question should be, does CVS automatically
increment the version by a certain amount after a patch?

Also, if I'm going to patch several files, should I tar up several 
.cc-patch files or do one big patch?

Thanks.

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com



Re: [PATCH] Percent complete in Setup.exe window title.

2002-02-24 Thread Robert Collins


===
- Original Message - 
From: "Gary R. Van Sickle" <[EMAIL PROTECTED]>


Commmitted minus the VC cr*p. (Which wasn't changelogged anyway :})

Rob




RE: [PATCH] Percent complete in Setup.exe window title.

2002-02-24 Thread Gary R. Van Sickle

> -Original Message-
> From: Robert Collins [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 24, 2002 2:26 AM
> To: Gary R. Van Sickle
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PATCH] Percent complete in Setup.exe window title.
>
>
> Looks nice. I'll commit to HEAD shortly.
>
> Why the discardable stringtable?
>

Something VC++'s resource editor decided to add for reasons known only to it.
I'm having trouble finding anything on what it actually means right now, does it
make any difference?  It sounds like a remnant of Win3.x.

--
Gary R. Van Sickle
Brewer.  Patriot.




Re: version information for cygcheck

2002-02-24 Thread Robert Collins

The usual thing to do for versions is to get the CVS version number and
apply that.

Rob




RE: [PATCH] Percent complete in Setup.exe window title.

2002-02-24 Thread Robert Collins

Looks nice. I'll commit to HEAD shortly.

Why the discardable stringtable?

Rob

> -Original Message-
> From: Gary R. Van Sickle [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 24, 2002 6:29 PM
> To: Cygwin-Patches
> Subject: [PATCH] Percent complete in Setup.exe window title.
> 
> 
> This one goes good with the new minimizeability of Setup.exe:
> 
> 2002-02-24  Gary R. Van Sickle  <[EMAIL PROTECTED]>
> 
>   * res.rc (STRINGTABLE): Add IDS_CYGWIN_SETUP and
>   IDS_CYGWIN_SETUP_WITH_PROGRESS strings.
>   * resource.h: Add IDS_CYGWIN_SETUP and
>   IDS_CYGWIN_SETUP_WITH_PROGRESS IDs.
> 
>   * splash.cc (OnInit): Qualify SetWindowText() call with 
> global scope
>   operator (::SetWindowText()).
> 
>   * threebar.cc: Run indent.
>   (cistring.h): Add include.
>   (SetText1, SetText2, SetText3): Qualify SetWindowText() 
> call with
>   global scope operator.
>   (SetBar2): Add logic for writing percent complete into 
> window title.
> 
>   * window.h: Run indent.
>   (SetWindowText): New function.
>   (String): Add forward declaration.
>   * window.cc: Run indent.
>   (String++.h): Add include.
>   (SetWindowText): New function.
> 
> -- 
> Gary R. Van Sickle
> Brewer.  Patriot. 
>